This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
lvm [2012/01/31 15:46] k2patel [Increasing Size] |
lvm [2017/01/13 19:23] k2patel [Worked Example on Live System] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== LVM ====== | ||
- | |||
- | LVM you can increase / decrease size without any issue.\\ | ||
- | But it is important you do it in proper steps. | ||
- | |||
- | |||
- | ==== Reducing Size ==== | ||
- | |||
- | <code bash> | ||
- | umount /home | ||
- | e2fsck -y /dev/mapper/VolGroup00-LogVol00 | ||
- | resize2fs -f /dev/mapper/VolGroup00-LogVol00 1536M | ||
- | lvreduce -L-512M /dev/mapper/VolGroup00-LogVol00 | ||
- | mount /home | ||
- | </code> | ||
- | |||
- | |||
- | ==== Increasing Size ==== | ||
- | <code bash> | ||
- | umount /opt/ | ||
- | e2fsck -y /dev/mapper/VolGroup00-LogVol02 | ||
- | lvextend -L+512M /dev/mapper/VolGroup00-LogVol02 | ||
- | resize2fs /dev/mapper/VolGroup00-LogVol02 | ||
- | mount /opt | ||
- | </code> | ||
- | |||
- | ==== Worked Example on Live System ==== | ||
- | |||
- | <code bash | history> | ||
- | lvdisplay | ||
- | vgdisplay | ||
- | lvextend -l+1599 /dev/VolGroup00/LogVol00 | ||
- | df -kh | ||
- | vgdisplay | ||
- | lvdisplay | ||
- | resize2fs /dev/VolGroup00/LogVol00 | ||
- | df -kh | ||
- | </code> | ||