此内容没有您所选择的语言版本。
6.4. Removing a Disk from a Logical Volume
This example shows how you can remove a disk from an existing logical volume, either to replace the disk or to use the disk as part of a different volume. In order to remove a disk, you must first move the extents on the LVM physical volume to a different disk or set of disks.
6.4.1. Moving Extents to Existing Physical Volumes 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
In this example, the logical volume is distributed across four physical volumes in the volume group
myvg
.
We want to move the extents off of
/dev/sdb1
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.
After the
pvmove
command has finished executing, the distribution of extents is as follows:
Use the
vgreduce
command to remove the physical volume /dev/sdb1
from the volume group.
The disk can now be physically removed or allocated to other users.