1. create a new partition: fdisk/dev/hdanl # select a logical partition. if not, create an extended partition first, then add the logical partition 1 # partition number (starting from 5),/dev/hda1 (select the number of the first partition) t8e # The partition type 8e indicates the LVM partition w # write to the partition table partprobe # Re-read the partition table mkfs? Te
1. create a new partition:
Fdisk/dev/hda
N
L # select a logical partition. If no, create an extended partition first, and then add a logical partition.
1 # partition number (starting from 5),/dev/hda1 (select the number of the first partition)
T 8e # partition type 8e indicates LVM partition
W # write to partition table
Partprobe # reread a partition table
Mkfs? T ext3/dev/hda6 # Format
Partx/dev/hda # view the partition table and usage of the current hard disk
II. create PV, resize VG, and LV
Pvcreate/dev/hda6
Vgdisplay # view the existing VG information. take the VG: VolGroup00 as an example.
Vgextend VolGroup00/dev/hda6 # Extended VolGroup00
Lvdisplay # view the existing LV information. the following uses the LV: LogVol01 as an example.
Lvextend? L 1G/dev/VolGroup00/LogVol01 # LV extension (size of space)
Resize2fs/dev/VolGroup00/LogVol01 # execute this reset size, which is effective for the currently used LogVol01
Df? H # Check the mounting status. the instance has been resized.