- 论坛徽章:
- 0
|
本帖最后由 hbh231 于 2010-05-01 00:00 编辑
拆除镜像就那么几步的,一定要搞清楚原理
你要踢的盘为鬼盘,首先使用
# lvdisplay –v –k /dev/vg00/lvol1 |more
...
...
--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 0 00000 stale 1 00000 current
00001 0 00001 stale 1 00001 current
00002 0 00002 stale 1 00002 current
00003 0 00003 stale 1 00003 current
00004 0 00004 stale 1 00004 current
00005 0 00005 stale 1 00005 current
00006 0 00006 stale 1 00006 current
00007 0 00007 stale 1 00007 current
本例中鬼盘的pv key 为0,其PE状态全为stale.
你的系统中要使用lvdisplay -v -k确认下鬼盘pv key,我猜应该是1,
请务必确认好pv key.然后使用
lvreduce -k -m 0 /dev/vg00/lvol1 0 (最后0为鬼盘pv key number)
lvreduce -k -m 0 /dev/vg00/lvol2 0
lvreduce -k -m 0 /dev/vg00/lvol3 0
lvreduce -k -m 0 /dev/vg00/lvol4 0
lvreduce -k -m 0 /dev/vg00/lvol5 0
lvreduce -k -m 0 /dev/vg00/lvol6 0
......................................................
逐个删除鬼盘mirror,此过程可能reduce成功之后终端会hang住
,使用kill命令杀掉hang掉的lvreduce进程即可.
然后:
# vgreduce -f vg00
skip alternate link /dev/dsk/c1t2d2
vgreduce: Couldn't query physical volume "/dev/dsk/c0t11d0":
The specified path does not correspond to physical volume attached to
this volume group
PV with key 0 sucessfully deleted from vg vg00
Repair done, please do the following steps.....:
1. save /etc/lvmtab to another file
2. remove /etc/lvmtab
3. use vgscan(1m) -v to re-create /etc/lvmtab
4. NOW use vgcfgbackup(1m) to save the LVM setup
最后:
# mv /etc/lvmtab /etc/lvmtab.org
# vgscan –v
vg00状态恢复正常后,更换备件再重新镜像.
如果没有把握,建议在做之前做系统磁带备份.
整个操作过程请参考红宝书第16章33-37页.
红宝书下载地址:http://blog.chinaunix.net/u1/54645/showart_427641.html
Good luck! |
|