分区
N
(开始划分分区)
à
P(
主分区
)->1(
第一个主分区
)
然后指定大小
分区的大小要相同
[root@localhost ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previouscontent won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
添加分区
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
添加主分区
1
First cylinder (1-130, default 1):
确定第一个主分区的起始磁柱,默认为
1
就好。
Last cylinder or +size or +sizeM or +sizeK (1-130, default 130):
50
设置大小(也可用
+ 200M
来指定)
Command (m for help): p
查看
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 50 401593+ 83 Linux
Command (m for help): t
改变分区类型
Selected partition 1
Hex code (type L to list codes): fd fd
为
linux raid autodetect
Changed system type of partition 1 to fd (Linux raid autodetect)
Command (m for help): p
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 50 401593+ fd Linux raid autodetect
Command (m for help): w
(
q
)
保存退出
(不保存退出)
划分完之后
[root@localhost ~]# fdisk �Cl
查看
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 50 401593+ fd Linux raid autodetect
Disk /dev/sdd: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 50 401593+ fd Linux raid autodetect
Disk /dev/sde: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sde1 1 50 401593+ fd Linux raid autodetect