分区
在虚拟机添加一块硬盘并重启虚拟机后,查看新添加的硬盘:
[root@node07 ~]# fdisk -l
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x202f2289
Device Boot Start End Blocks Id System
/dev/sdb1 1 650 5221093+ 83 Linux
/dev/sdb2 651 1305 5261287+ 83 Linux
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x0a72e143
注:Disk /dev/sdc 为新加硬盘
确认新硬盘已经添加后,进行分区:
[root@node07 ~]# fdisk /dev/sdc
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help):
输入n进行分区:(不懂的可以输入m打开帮助)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
输入p,创建主分区:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1