Extend logical volume online in linux

1. Add a hard disk in server
2. Login as root on the machine
3. Run the following command to view the new hard disk
fdisk -l
4. Create pv from hd
pvcreate /dev/cciss/hd-number
5. Extend the volume group
vgextend vg-name /dev/cciss/hd-number
6. Extend the logical volume
lvextend -L +xG /dev/vg-name/lv-name
7. Extend filesystem online
resize2fs /dev/vg-name/lv-name

Leave a comment