How do you extend a LV? For example, How do you expand /var file system with additional 2GB space?
- Check which logical volume (LV) holds the /var file system using df –h
- Now, find out this particular LV belongs to which VG using lvdisplay <lv_name>
- Check the free space available in that Volume Group (VG) using vgdisplay <vgname>. Look for "Free PE / Space" line in the ouput.
- If the free space available in VG, now you can expand the LV using lvextend –L +2G <lv_name>. Now, Logical Volume has been expanded. Now we have to expand the file system using resize2fs /var. All these can be done in online without unmounting the filesystems.
No comments:
Post a Comment