LVM is a highly flexible abstraction layer for hard disks, or the like. It sits somewhere in between the physical storage device and the filesystem, but other layers like e.g. dm-raid or loop-devices may exist below or above it.
vgextend <vgname> <pvpath>
pvmove <pvpath>
vgreduce <vgname> <pvpath>
This works by merging the two volume groups temporarily, so the destination volume group must be unused during the process.
Since the meaning of source
and target
differs in the commands
involved, the later assumes srcvg
being the volume group containing
volumes to move away and dstvg
being the volume group to move to.
dstvg
into srcvg
: vgmerge <srcvg> <dstvg>
dstvg
: pvmove -n <lvname> <srcpv> <dstpv>
lvchange -an <lvpath>
dstpv
from srcvg
: vgsplit <srcvg> <dstvg> <dstpv>
vgchange -ay <dstvg>
/etc/fstab
and finally mount them again
Just use the -m
flag to lvdisplay
.