LWN.net Logo

Fedora and LVM

Fedora and LVM

Posted Nov 1, 2012 12:57 UTC (Thu) by pbonzini (subscriber, #60935)
In reply to: Fedora and LVM by epa
Parent article: Fedora and LVM

pvcreate "formats" a partition for use with LVM.

vgextend (mentioned in the man page for pvcreate) adds the partition to the existing volume group.

pvmove moves the logical volume from the old disk to the new disk.

vgremove removes the old partition from the volume group.

Remember to move /boot manually (it should be easy to do it with dd since it can be left read-only).


(Log in to post comments)

Fedora and LVM

Posted Nov 1, 2012 14:40 UTC (Thu) by epa (subscriber, #39769) [Link]

Thank you.

Fedora and LVM

Posted Nov 2, 2012 0:34 UTC (Fri) by lacos (subscriber, #70616) [Link]

s/vgremove/vgreduce/ ; see above (commenting here so you get an email possibly and don't miss the correction)

Fedora and LVM

Posted Nov 1, 2012 21:13 UTC (Thu) by agk (subscriber, #23332) [Link]

> pvcreate "formats" a partition for use with LVM.

BTW This step is optional now. Basic pvcreate functionality is included in vgextend (and vgcreate).

Fedora and LVM

Posted Nov 2, 2012 0:33 UTC (Fri) by lacos (subscriber, #70616) [Link]

> vgremove removes the old partition from the volume group.

I think this is not correct (it caught my eye because I also have the most trouble remembering this step).

"vgremove" removes an entire volume group.

Instead "vgreduce" is needed here (evict the PV (ie. the partition) from the VG).

Afterwards "pvremove" may be invoked on the partition to "wipe[] the label on [the] device so that LVM will no longer recognise it as a physical volume".

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds