Friday, April 16, 2010

Extending Filesystem By LVM


How to Increase a File system
scenario : suppose you want to increase /home file system to 20GB

As you can see, we have used 20% up all the available space on the filesystem and the size is 4.9 GB now we want to increase it to 15GB.If this filesystem had been created on a disk partition, the only way forward would be either to delete some data or to repartition the disk, but LVM can extend the logical volume and the filesystem. We have to start with the logical volume:

# lvdisplay /dev/mapper/VolGroup01-LogVol04|grep -i Size
LV Size 5.00 GB

#lvextend -L10G dev/mapper/VolGroup01-LogVol04

Extending logical volume testlv to 10G

Logical volume testlv successfully resized

Now to increase the file system without reboot

#resize2fs /dev/mapper/VolGroup01-LogVol04

No comments:

Post a Comment