创建分区:
[root@ www.linuxidc.com ~]# fdisk /dev/sdb
The number of cylinders for this disk isset to 2610.
There is nothing wrong with that, but thisis larger than 1024,
and could in certain setups cause problemswith:
1) software that runs at boot time (e.g.,old versions of LILO)
2) booting and partitioning software fromother OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n ---创建分区
Command action
e extended
p primary partition (1-4) --指定分区类型为主分区
p
Partition number (1-4): 1 --指定其实分区号
First cylinder (1-2610, default 1): 1 --指定起始柱面号
Last cylinder or +size or +sizeM or +sizeK(1-2610, default 2610): 1024 ---指定终止柱面号
Command (m for help): w ---保存分区配置信息
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition tablefailed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the nextreboot.
Syncing disks.
增加分区:
[root@ www.linuxidc.com ~]# fdisk /dev/sdb -----增加分区
The number of cylinders for this disk isset to 2610.
There is nothing wrong with that, but thisis larger than 1024,
and could in certain setups cause problemswith:
1) software that runs at boot time (e.g.,old versions of LILO)
2) booting and partitioning software fromother OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n ---分区类型
Command action
e extended
p primary partition (1-4) ---还是指定主分区
p
Partition number (1-4): 1 ---分区号,我指定1。
Partition 1is already defined. Delete it beforere-adding it.
–提示分区号1已经存在,删除后操作
Command (m for help): n --我们重新创建分区
Command action
e extended
p primary partition (1-4) --指定分区类型
p
Partition number (1-4): 2 ---因为分区1已经存在,所以我们指定分区2,可通过。
First cylinder (1025-2610, default 1025): ---指定起始礠柱号,默认是上一分区后一号。
Using default value 1025
Last cylinder or +size or +sizeM or +sizeK(1025-2610, default 2610): 2000 --指定终止礠柱号。
Command (m for help): w ---保存分区配置
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition tablefailed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the nextreboot.
Syncing disks.
[root@ www.linuxidc.com ~]#
