我想从根镜像中删除磁盘。要删除的磁盘是/dev/disk/disk2_p2
lvreduce -m 0 /dev/vg00/lvol1 /dev/disk/disk2_p2
lvreduce -m 0 /dev/vg00/lvol2 /dev/disk/disk2_p2
lvreduce -m 0 /dev/vg00/lvol3 /dev/disk/disk2_p2
lvreduce -m 0 /dev/vg00/lvol4 /dev/disk/disk2_p2
lvreduce -m 0 /dev/vg00/lvol5 /dev/disk/disk2_p2
lvreduce -m 0 /dev/vg00/lvol6 /dev/disk/disk2_p2
lvreduce -m 0 /dev/vg00/lvol7 /dev/disk/disk2_p2
好的。但是当我想移除磁盘时
vgreduce vg00 /dev/disk/disk2_p2
它说
vgreduce: Physical volume "/dev/disk/disk2_p2" could not be removed since some of its
physical extents are still in use.
我试着检查一下
for i in /dev/vg00/lvol*;do lvdisplay -v $i|wc -l;done
并且输出总是相同的。如何减少?
答案1
您必须将范围移动到另一个磁盘,例如,使用pvmove
.这在4.3.7.从卷组中删除物理卷(尽管操作系统不同,但建议大部分都适用,无需更改)。
进一步阅读:
- pv移动(1M)(HPUX)
- hp ux vgreduce 问题