# fdisk /dev/hda
press p (to print the partition table) and n (to create a new partition)
如果是新加进来的硬盘或存储这一步可以省略;
第四步:创建一个物理卷.
下述命令将在分区的起始处创建一个卷组描述符:
# pvcreate /dev/hda6
pvcreate -- -physical volume "/dev/hda6" successfully created
# pvcreate /dev/hda7
pvcreate- -- physical volume "/dev/hda7" successfully created
创建完之后,用pvdisplay或者pvs查看.
第五步:创建一个卷组.
通过下面的方法创建一个新的卷组,并且添加两个物理卷:
# vgcreate test_lvm /dev/hda6 /dev/hda7
vgcreate- -- INFO: using default physical extent size 4 MB
vgcreate- -- INFO: maximum logical volume size is 255.99 Gigabyte
vgcreate- -- doing automatic backup of volume group "test_lvm"
vgcreate- -- volume group "test_lvm" successfully created and activated