[root@*****~]# fdisk /dev/sda
The number of cylinders for this disk is set to
39162.
There is nothing wrong with that, but this is larger than
1024,
and could in certain setups cause problems
with:
1) software that runs at boot time (e.g., old versions of
LILO)
2) booting and partitioning software from other
OSs
(e.g., DOS FDISK,
OS/2 FDISK)
#输入n,新建分区
Command (m for help):n
#输入P,主分区
Command action
e extended
p primary partition
(1-4)
p
#目前是sda第三个分区输入3
Partition number (1-4): 3
#敲回车,默认就行了(如果要分多个分区,这儿就制定数值)
First cylinder (39163-110960, default 39163):
Using default value 39163
Last cylinder or +size or +sizeM or +sizeK (39163-110960,
default 110960):
Using default value 110960
#这里输入t
Command (m for help): t
#这里选择第三个分区
Partition number (1-4): 3
#指定分区的格式为8e
(LVM)
Hex code (type L to list codes): 8e
Changed system type of partition 3 to 8e (Linux
LVM)
#输入p查看一下
Command (m for help): p
Disk /dev/sda: 912.6 GB, 912680550400 bytes
255 heads, 63 sectors/track, 110960 cylinders
Units = cylinders of 16065 * 512 = 8225280
bytes
Device
Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 39162 314464342+ 8e Linux
LVM
/dev/sda3 39163 110960 576717435
8e Linux
LVM
#这里输入w,保存退出
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error
16: (这里有个小报错,不用管它).
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
#重启使其生效
[root@***** ~]# reboot
Broadcast message from root (pts/1) (Tue May 15 12:12:27
2012):
The system is going down for reboot NOW!
[root@***** ~]#