1 查看磁盘信息
[minto@localhost ~]$ sudo df -h
/dev/mapper/vg_mtcentos6-lv_root
50G 4.5G 43G 10% /
tmpfs 1.0G 88K 1.0G 1% /dev/shm
/dev/sda1 477M 71M 381M 16% /boot
/dev/mapper/vg_mtcentos6-lv_home
55G 137M 52G 1% /home
[minto@localhost ~]$ sudo fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a771a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 14594 116707328 8e Linux LVM
2 创建分区
Fdisk /dev/vdb
N
P
3
W
Q
3 分区完成后重新加载磁盘
Partprobe
4 看到新建的分区/dev/vdb3出现后,进行格式化
mkfs.ext3 /dev/vdb3
5 进行挂载
Mkdir /data
Mount /dev/vdb3 /data
6 设置自动挂载
查询分区id blkid /dev/vdb3
写入系统配置文件
Vim /etc/fstab
[UUID=************] [挂载磁盘分区] [挂载磁盘格式] 0 2
7 卸载分区
Umount /dev/vdb3
8 删除分区
Fdisk /dev/vdb
D
3
W
Q