Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


kvm_shrink_nested_lvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
kvm_shrink_nested_lvm [2014/06/11 15:52] – [KVM shrink nested LVM] adminkvm_shrink_nested_lvm [2014/06/11 15:56] – [KVM shrink nested LVM] 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, logical volumes etc. For example reduce home directory. <code># log in as root via serial, or via SSH.   * Remove content in VM. Free some space, reduce filesystems, logical volumes etc. For example reduce home directory. <code># log in as root via serial, or via SSH.
  
Line 17: Line 19:
 pvresize -v --setphysicalvolumesize 16G /dev/vda2</code> pvresize -v --setphysicalvolumesize 16G /dev/vda2</code>
   * On the KVM host, reduce the LV. <code>lvresize -L16G /dev/vg_kvm1/vmns2</code>   * On the KVM host, reduce the LV. <code>lvresize -L16G /dev/vg_kvm1/vmns2</code>
 +  * On the guest force fsck check at next boot, and reboot. <code>touch /forcefsck
 +reboot</code>
 +
  
  
kvm_shrink_nested_lvm.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1