1.使用fdisk创建6个分区[1P+1E(5L)] //dev/sdb1 /dev/sdb5 /dev/sdb6 /dev/sdb7 /dev/sdb8 /deb/sdb9
--------------------------------------------------------------------
注:如果你对python感兴趣,我这有个学习Python基地,里面有很多学习资料,感兴趣的+Q群:895817687
--------------------------------------------------------------------
1 [root@server ~]# fdisk -l
2
3 Disk /dev/sda: 8589 MB, 8589934592 bytes
4 255 heads, 63 sectors/track, 1044 cylinders
5 Units = cylinders of 16065 * 512 = 8225280 bytes
6 Sector size (logical/physical): 512 bytes / 512 bytes
7 I/O size (minimum/optimal): 512 bytes / 512 bytes
8 Disk identifier: 0x000aec72
9
10 Device Boot Start End Blocks Id System
11 /dev/sda1 * 1 26 204800 83 Linux
12 Partition 1 does not end on cylinder boundary.
13 /dev/sda2 26 91 524288 82 Linux swap / Solaris
14 Partition 2 does not end on cylinder boundary.
15 /dev/sda3 91 1045 7658496 83 Linux
16
17 Disk /dev/sdb: 1073 MB, 1073741824 bytes
18 255 heads, 63 sectors/track, 130 cylinders
19 Units = cylinders of 16065 * 512 = 8225280 bytes
20 Sector size (logical/physical): 512 bytes / 512 bytes
21 I/O size (minimum/optimal): 512 bytes / 512 bytes
22 Disk identifier: 0x00000000
2.fdisk -cu /dev/sdb开始分区
1 [root@server ~]# fdisk -cu /dev/sdb //-c:表示丢弃DOS兼容模式,切换到mode模式; -u:表示从柱面分区改为扇区分区
2 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
3 Building a new DOS disklabel with disk identifier 0x94c5ab35.
4 Changes will remain in memory only, until you decide to write them.
5 After that, of course, the previous content won't be recoverable.
6
7 Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
8
9 Command (m for help):
3.输入m查看帮助
1 Command (m for help): m
2 Command action