Remove failed disk from LVM group
Posted by valqk on
Removing a Disk from a Logical Volume
Moving Extents to Existing Physical Volumes
#> pvs -o+pv_used
We want to move the extents off of /dev/md4 so that we can remove it from the volume group.
If there are enough free extents on the other physical volumes in the volume group, you can execute the pvmove command on the device you want to remove with no other options and the extents will be distributed to the other devices.
#> pvmove /dev/md4
After the pvmove command has finished executing, check the distribution of extents :
#> pvs -o+pv_used
Use the vgreduce command to remove the physical volume /dev/md4 from the volume group.
# vgreduce vg_name /dev/md4
Removed "/dev/md4" from volume group "vg_name"
# pvs
Moving Extents to Existing Physical Volumes
#> pvs -o+pv_used
We want to move the extents off of /dev/md4 so that we can remove it from the volume group.
If there are enough free extents on the other physical volumes in the volume group, you can execute the pvmove command on the device you want to remove with no other options and the extents will be distributed to the other devices.
#> pvmove /dev/md4
After the pvmove command has finished executing, check the distribution of extents :
#> pvs -o+pv_used
Use the vgreduce command to remove the physical volume /dev/md4 from the volume group.
# vgreduce vg_name /dev/md4
Removed "/dev/md4" from volume group "vg_name"
# pvs