Logical Volume:
--> To Create LVM partitions are using [8e]
--> Physical Volume Creation
--> pvcreate devicename1 devicename2..
Example:
# pvcreate /dev/hda10 /dev/hda11
# pvcreate /dev/sda10 /dev/sda11 [sata hard drive]
--> Volume group creation
--> vgcreate volumegroupname devicename1 devicename2
--> logical volume creation
# lvcreate -L size -n lv1 vg
To Create a file system:
mke2fs -j /dev/vg/lv1
mount /dev/vg/lv1 /data
/etc/fstab
--- /dev/vg/lv1 /data auto default 1 2
To extend a Logical Volume:
lvextend -L +200m /dev/vg/lv1
mount -0 remount /dev/vg/lv1
To reduce Logical Volume:
lvreduce -L -100m /dev/vg/lv1
mount -o remount /dev/vg/lv1
To Check:
ext2online /dev/vg/lv1 [in el4]
or
resize -t /dev/vg/lv1 [in el5]
|