kvm_shrink_nested_lvm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
kvm_shrink_nested_lvm [2014/06/11 15:33] – [KVM shrink nested LVM] admin | kvm_shrink_nested_lvm [2014/06/11 15:54] – admin | ||
---|---|---|---|
Line 2: | Line 2: | ||
~~TOC~~ | ~~TOC~~ | ||
=====KVM shrink nested LVM===== | =====KVM shrink nested LVM===== | ||
+ | **Note! Backup your data first!** | ||
+ | |||
* Remove content in VM. Free some space, reduce filesystems, | * Remove content in VM. Free some space, reduce filesystems, | ||
Line 10: | Line 12: | ||
* If you need to reduce the rootfs, boot from network, usb or cd/dvd. Then resize the filesystem. For example, edit guest to boot from systemrescuecd. < | * If you need to reduce the rootfs, boot from network, usb or cd/dvd. Then resize the filesystem. For example, edit guest to boot from systemrescuecd. < | ||
lvresize -r -L8G / | lvresize -r -L8G / | ||
- | * Shrink physical volume. < | + | * Shrink physical volume. First move LV's to beginning.< |
pvdisplay -m | pvdisplay -m | ||
pvmove -v / | pvmove -v / | ||
pvmove -v / | pvmove -v / | ||
- | + | pvmove -v / | |
pvresize -v --setphysicalvolumesize 16G / | pvresize -v --setphysicalvolumesize 16G / | ||
+ | * On the KVM host, reduce the LV. < | ||
kvm_shrink_nested_lvm.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1