lvm 坏了一个磁盘的卷组
This is the scenario:
这是场景:
I want to remove a old hard disk which is a LVM PV and contains data. There is free space available on other PVs in the VG. It should move the data from the disk to be removed to other PVs and then remove the disk.
我想删除一个旧的硬盘 ,它是LVM PV并包含数据。 VG中其他PV上有可用空间 。 它应将数据从要删除的磁盘移动到其他PV,然后再删除磁盘。
The process to remove sdb
from VG vg
is as follows.
从VG vg
删除sdb
的过程如下。
First, distribute old extends from sdb
to other PV
首先,将旧版本从sdb
分发到其他PV
# pvmove /dev/sdb
it will take much time.
这将花费很多时间。
Second, delete sdb
二,删除sdb
# vgreduce vg /dev/sdb
Now, you can physically remove the sdb
disk.
现在,您可以物理删除sdb
磁盘。
Then you can add new disks and extend the VGs.
然后,您可以添加新磁盘并扩展VG 。
After vgreduce
, you may wipe the labels on the disk by
vgreduce
之后,您可以通过以下方式擦除磁盘上的标签:
# pvremove /dev/sdb
翻译自: https://www.systutorials.com/how-to-delete-a-disk-from-a-lvm-group-while-keeping-the-data/
lvm 坏了一个磁盘的卷组