[linux-lvm] Shrinking LVM partition at beginning

Alasdair G Kergon agk at redhat.com
Sat Apr 9 23:19:54 UTC 2016


Outline of the process:

Work out the new layout as best you can.

vgcfgbackup the metadata into a text file.

Update partition table moving the start of the partition, being careful to
respect any alignment restrictions.

Edit the text file based on the new partition start location so that all the
data will be in the same place (so all extent numbers will be smaller by
the same fixed amount, and dev_size and pe_start values will change).

pvcreate with --restorefile and -Zn to format the "new" partition for LVM's
use based on the edited file.

vgcfgrestore from that file.

Alasdair




More information about the linux-lvm mailing list