This shows you the differences between two versions of the page.
|
doc:lvm [2013/08/16 00:48] stwn created |
doc:lvm [2013/08/16 01:00] (current) stwn +growing lv |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Logical Volume Manager (LVM) ====== | ====== Logical Volume Manager (LVM) ====== | ||
| - | ===== Resizing Logical Volume (LV) ===== | + | ===== Reducing Logical Volume ===== |
| - | - Unmount LV containing the filesystem which you want to resize.<code># umount /dev/lv/home</code> | + | - Unmount Logical Volume (LV) containing the filesystem which you want to resize.<code># umount /dev/lv/home</code> |
| - Check the filesystem with e2fsck first.<code># e2fsck -f /dev/lv/home</code> | - Check the filesystem with e2fsck first.<code># e2fsck -f /dev/lv/home</code> | ||
| - Resize the filesystem.<code># resize2fs /dev/lv/home 9G</code> | - Resize the filesystem.<code># resize2fs /dev/lv/home 9G</code> | ||
| Line 9: | Line 9: | ||
| - Check and resize filesystem to the maximum size of LV.<code># e2fsck -f /dev/lv/home | - Check and resize filesystem to the maximum size of LV.<code># e2fsck -f /dev/lv/home | ||
| # resize2fs /dev/lv/home</code> | # resize2fs /dev/lv/home</code> | ||
| + | |||
| + | ===== Growing Logical Volume ===== | ||
| + | - Unmount LV containing the filesystem which you want to resize.<code># umount /dev/lv/data</code> | ||
| + | - Check the filesystem with e2fsck first.<code># e2fsck -f /dev/lv/data</code> | ||
| + | - Check the remaining free physical extents.<code># vgdisplay</code> | ||
| + | - Resize the LV.<code># lvresize -L +50,01G /dev/lv/data</code> | ||
| + | - Check and resize filesystem to the maximum size of LV.<code># e2fsck -f /dev/lv/data | ||
| + | # resize2fs /dev/lv/data</code> | ||