Chinaunix

标题: 请教高手:无法unmirrorvg,应怎么办!急 [打印本页]

作者: tie2003    时间: 2005-08-01 13:49
标题: 请教高手:无法unmirrorvg,应怎么办!急
因为mirror的盘有问师需重新加盘做mirror,但在unmirrorvg时就有问题
1、做unmirrorvg操作
smitty unmirrorvg=>;
VOLUME GROUP name 输入   rootvg
Number of COPIES of each logical   选  1
PHYSICAL VOLUME names F4选择要剃除的PV时F4 列出如下:

0516-304 : Unable to find device id 0056eb8d1570663a in the Device   Configuration Database.                                 
PV                                                                    
0056eb8d1570663a                                                      
hdisk3   

若不选PV,执行unmirrorvg时报以下错误;
>;>; unmirrorvg rootvg


    Output from Command_to_Execute follows below:

---- start ----

0516-1155 lreducelv: Last good copy of a partition cannot reside on a missing disk.
Try again after reactivating the disk using chpv and varyonvg.
0516-922 rmlvcopy: Unable to remove logical partition copies from
        logical volume hd6.
0516-1135 unmirrorvg: The unmirror of the volume group failed.
        The volume group is still partially or fully mirrored.

---- end ----
作者: dugong    时间: 2005-08-01 13:52
标题: 请教高手:无法unmirrorvg,应怎么办!急
看上去好像你作Mirror的那2个盘已经坏掉一个了。
作者: tie2003    时间: 2005-08-01 14:53
标题: 请教高手:无法unmirrorvg,应怎么办!急
是的,那一个盘就是有问题了,我才要unmirrorvg,换盘后,重做mirrorvg的
作者: nimysun    时间: 2005-08-01 15:16
标题: 请教高手:无法unmirrorvg,应怎么办!急
Notes:
If LVM has not recognized that a disk has failed it is possible that LVM will remove a different mirror. Therefore if you know that a disk has failed and LVM does not show those disks as missing you should specify the failed disks on the command line or you should use replacepv to replace the disk or reducevg to remove the disk.
If a logical volume copy spans more than one disk, the portion of the logical volume copy that resides on a disk not listed by the user is also removed.
The unmirrorvg command is not allowed on a snapshot volume group.


所以我觉得,你应该这样试试

# unmirrorvg rootvg hdisk7

参考网页:
http://publib16.boulder.ibm.com/pseries/en_US/cmds/aixcmds5/unmirrorvg.htm
作者: dugong    时间: 2005-08-01 15:21
标题: 请教高手:无法unmirrorvg,应怎么办!急
是不是已经将坏掉的盘删除了,应该先unmirrorvg,reducevg,最后才rmdev
作者: tie2003    时间: 2005-08-01 15:44
标题: 请教高手:无法unmirrorvg,应怎么办!急
我一开始,检查好环境后,就直接执行的unmirrorvg,就不成功。
对了我在讲一下环境,可能原因是不是一对盘。

当时,已经做好了多组盘,每组两个盘,一个母盘,一个mirror盘。
然后将每组盘插到多台服务器上。

我估计一开始母盘与mirror盘就弄乱了,启机后,mirror就不对,有多个机器都有同样的问题。
因为当时没有发现问题就生产了,一个月后才发现问题,再unmirrorvg就不行了。

有那位高手现在可以解决unmirrorvg的问题啊!
作者: tie2003    时间: 2005-08-01 15:47
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "nimysun" 发表:
Notes:
If LVM has not recognized that a disk has failed it is possible that LVM will remove a different mirror. Therefore if you know that a disk has failed and LVM does not show those disks as missi..........



我当时用smitty unmirrorvg做的,没有用命令行试,因为是生产机,不能随意试。并且hdiskX在盘中已以认不到了,只认出0056eb8d1570663a  ,总不能
unmirrorvg rootvg 0056eb8d1570663a  吧!
作者: tie2003    时间: 2005-08-01 15:49
标题: 请教高手:无法unmirrorvg,应怎么办!急
[quote]原帖由 "dugong"]是不是已经将坏掉的盘删除了,应该先unmirrorvg,reducevg,最后才rmdev[/quote 发表:


目前的状态也可能认为是先将坏掉的盘删掉了,如果像您说的这样应怎样解决unmirrorvg的问题
作者: feiaix    时间: 2005-08-01 15:59
标题: 请教高手:无法unmirrorvg,应怎么办!急
建议你先按照nimysun的建议先试试。
作者: tie2003    时间: 2005-08-01 16:04
标题: 请教高手:无法unmirrorvg,应怎么办!急
[quote]原帖由 "feiaix"]建议你先按照nimysun的建议先试试。[/quote 发表:

关键是再认mirror PV是hdiskXXX啊
目前系统中
PHYSICAL VOLUME names F4选择要剃除的PV时F4 列出如下:

0516-304 : Unable to find device id 0056eb8d1570663a in the Device   Configuration Database.                                 
PV                                                                     
0056eb8d1570663a                                                      
hdisk3

其中hdisk3是目前正在active的rootvg 的PV,另一个0056eb8d1570663a估计就是那块坏的mirror PV了。
总不能我执行 # unmirrorvg rootvg 0056eb8d1570663a   吧
谢谢
作者: nimysun    时间: 2005-08-01 16:05
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "tie2003" 发表:



我当时用smitty unmirrorvg做的,没有用命令行试,因为是生产机,不能随意试。并且hdiskX在盘中已以认不到了,只认出0056eb8d1570663a  ,总不能
unmirrorvg rootvg 0056eb8d1570663a  吧!



做技术要胆大心细,不要害怕。

unmirrorvg rootvg hdisk0
作者: feiaix    时间: 2005-08-01 16:05
标题: 请教高手:无法unmirrorvg,应怎么办!急
To replace a bad disk drive in a mirrored volume group, enter:

unmirrorvg workvg hdisk7
reducevg workvg hdisk7
rmdev -l hdisk7 -d
replace the disk drive, let the drive be renamed hdisk7
extendvg workvg hdisk7
mirrorvg workvg
作者: feiaix    时间: 2005-08-01 16:06
标题: 请教高手:无法unmirrorvg,应怎么办!急
To replace a bad disk drive in a mirrored volume group, enter:

unmirrorvg workvg hdisk7
reducevg workvg hdisk7
rmdev -l hdisk7 -d
replace the disk drive, let the drive be renamed hdisk7
extendvg workvg hdisk7
mirrorvg workvg
作者: nimysun    时间: 2005-08-01 16:08
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "tie2003" 发表:


目前的状态也可能认为是先将坏掉的盘删掉了,如果像您说的这样应怎样解决unmirrorvg的问题



有点不同意,如果先rmdev,系统会报错的,不让你删除的。

我再查查资料。
作者: tie2003    时间: 2005-08-01 16:10
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "nimysun" 发表:



做技术要胆大心细,不要害怕。

unmirrorvg rootvg hdisk0

可是没有hdisk0这个PV啊,
假若按的说做可以unmirrovg了,那热行reducevg也要执行
reducevg rootvg hdisk0吗,
这么做我总觉得有问题。
作者: tie2003    时间: 2005-08-01 16:14
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "nimysun" 发表:



有点不同意,如果先rmdev,系统会报错的,不让你删除的。

我再查查资料。

因为系统没有认出mirror PV
状态是defined,所以应该是可以删除的。
目前可能不是这个问题,可能怀疑是这一组盘不是同一级mirror盘,所以系统报错stale,因此我才要重建mirror的。
作者: tie2003    时间: 2005-08-01 16:17
标题: 请教高手:无法unmirrorvg,应怎么办!急
另外,我也想了一个方案:
做系统备份(将mirror信息拆除),再做系统恢复,再做mirror。
但我想这么做,比较费时间。
我想应该有一个方法可以解决这个问题。

我也试过rmlvcopy来一个一个拆lv  mirror,但报同样的问题。
作者: meteor06    时间: 2005-08-01 16:51
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "tie2003" 发表:



我当时用smitty unmirrorvg做的,没有用命令行试,因为是生产机,不能随意试。并且hdiskX在盘中已以认不到了,只认出0056eb8d1570663a  ,总不能
unmirrorvg rootvg 0056eb8d1570663a  吧!

unmirrorvg  后的参数可以是 pvid
试下
unmirrorvg rootvg 0056eb8d1570663a
作者: tie2003    时间: 2005-08-01 16:55
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "meteor06" 发表:

unmirrorvg  后的参数可以是 pvid
试下
unmirrorvg rootvg 0056eb8d1570663a

我再smitty unmirrorvg下试过选择0056eb8d1570663a后执行,也是同样问题
作者: netyu    时间: 2005-08-01 17:12
标题: 请教高手:无法unmirrorvg,应怎么办!急
先unmirrorvg rootvg
再reducevg root hdiskx
rmdev -l /dev/hdiskx -d

接着chdev -f /dev/hdiskx
再将新硬盘加入到rootvg, extendvg rootvg hdiskx
再作mirror,  mirror -c 2 rootvg



作者: tie2003    时间: 2005-08-01 17:37
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "netyu" 发表:
先unmirrorvg rootvg
再reducevg root hdiskx
rmdev -l /dev/hdiskx -d

接着chdev -f /dev/hdiskx
再将新硬盘加入到rootvg, extendvg rootvg hdiskx
再作mirror,  mirror -c 2 rootvg



目前,我已经无法unmirrorvg了,怎么办
谢谢
作者: biti_rainy    时间: 2005-08-01 20:10
标题: 请教高手:无法unmirrorvg,应怎么办!急
逐个 rmlvcopy  lvname  hdiskX
reducevg vgname hdiskX

如果 hdisk 已经被 rmdev 删除了,则
lquery -p hdiskX -At   得到 pvid
然后reducevg vgname pvid
作者: koala_mel    时间: 2005-08-02 08:00
标题: 请教高手:无法unmirrorvg,应怎么办!急
why not you can not run #unmirrorvg rootvg 00563b8d1570663a,

hehe
作者: koala_mel    时间: 2005-08-02 08:04
标题: 请教高手:无法unmirrorvg,应怎么办!急
why you want to do unmirrorvg ? you do not need to use the unmirrorvg command, then you can fix your issue.

rmlvcopy is a better command for you, I think.
作者: tie2003    时间: 2005-08-02 11:18
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "koala_mel" 发表:
why you want to do unmirrorvg ? you do not need to use the unmirrorvg command, then you can fix your issue.

rmlvcopy is a better command for you, I think.


I have already run rmlvcopy command.But the error was same as the unmirrorvg command.
作者: tie2003    时间: 2005-08-02 11:24
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "biti_rainy" 发表:
逐个 rmlvcopy  lvname  hdiskX
reducevg vgname hdiskX

如果 hdisk 已经被 rmdev 删除了,则
lquery -p hdiskX -At   得到 pvid
然后reducevg vgname pvid


lquery怎么没有这个命令,是AIX5L的命令吗?
我没有看到这个命令啊
作者: koala_mel    时间: 2005-08-02 13:28
标题: 请教高手:无法unmirrorvg,应怎么办!急
use redefine rootvg command first, then use lspv to see if the pv is in the vg,  then use rmlvcopy
作者: tie2003    时间: 2005-08-02 13:44
标题: 请教高手:无法unmirrorvg,应怎么办!急
[quote]原帖由 "koala_mel"]use redefine rootvg command first, then use lspv to see if the pv is in the vg,  then use rmlvcopy[/quote 发表:

你的意思是说用
# redefinevg -d hdisk0 rootvg
也就是说,通过这个命令可以将mirror的那块盘从VG中剃除了是吗?
然后再rmlvcopy就可将单个LV移除mirror是吗?

谢谢!
作者: koala_mel    时间: 2005-08-02 14:05
标题: 请教高手:无法unmirrorvg,应怎么办!急
the redefine command will help to get the configuration from the odm, so after that you can use the rmlvcopy and reducevg command. but it does not mean to delete it from the rootvg , it will depend on the situation. but I think redefinevg command can help you to fix the issue.
作者: koala_mel    时间: 2005-08-02 14:09
标题: 请教高手:无法unmirrorvg,应怎么办!急
For the rootvg volume group, you can use the redefinevg command, which examines every disk in the system to determine which volume group it belongs to
and then updates the ODM. For example:
# redefinevg rootvg

after you can find if that bad disk exists on root vg and decide what to do next.
作者: tie2003    时间: 2005-08-02 14:20
标题: 请教高手:无法unmirrorvg,应怎么办!急
[quote]原帖由 "koala_mel"]the redefine command will help to get the configuration from the odm, so after that you can use the rmlvcopy and reducevg command. but it does not mean to delete it from the rootvg , it will depend on..........[/quote 发表:

If I modify the /image.data file about mirror copy number and mksys the system and restore the system , is it right?
作者: RS9000    时间: 2005-08-02 15:42
标题: 请教高手:无法unmirrorvg,应怎么办!急
如果你有系统备份,你可以尝试一下:
如果你的盘支持热拔插:
1、直接拔掉要换的盘
2、换上好盘
3、做migratepv(源盘,选你拔掉的坏盘,目标盘,选你新加的盘)
4、如果成功,删除坏盘的定义就OK了
作者: biti_rainy    时间: 2005-08-02 19:46
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "tie2003" 发表:


lquery怎么没有这个命令,是AIX5L的命令吗?
我没有看到这个命令啊


sorry,  lqueryvg
作者: koala_mel    时间: 2005-08-03 06:14
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "tie2003" 发表:

If I modify the /image.data file about mirror copy number and mksys the system and restore the system , is it right?


restore is a good method.
but why not just use command to fix it? it is not that difficult and it can help us to understand LVM and such kind of things. it depend on that if  you want to learn something on aix or you just want to fix the issue as soon as possible. sometimes system administrator does not need very good technical skills. anyway...
作者: ibm6000    时间: 2005-08-03 07:13
标题: 请教高手:无法unmirrorvg,应怎么办!急
这个问题以前遇到过,印象不深了,好象是用chlvcopy的
作者: younghawk    时间: 2005-08-03 14:23
标题: 请教高手:无法unmirrorvg,应怎么办!急
你查看pv的状态
作者: 大猫    时间: 2005-08-03 17:16
标题: 请教高手:无法unmirrorvg,应怎么办!急
# redefinevg rootvg
# lspv 查rootvg所含的pv/pvid
# unmirrorvg rootvg pv/pvid
作者: koala_mel    时间: 2005-08-04 12:35
标题: 请教高手:无法unmirrorvg,应怎么办!急
[quote]原帖由 "ibm6000"]这个问题以前遇到过,印象不深了,好象是用chlvcopy的[/quote 发表:


we need you to call back you memory. please.
作者: tie2003    时间: 2005-08-04 14:00
标题: 请教高手:无法unmirrorvg,应怎么办!急
各位高手,我已以做过实验,而且问题已经重现。
提醒大家注意:
1、因为我们做了大量的盘的mirrorvg,所以将每组盘插入新机器时,可以插错,不是一组盘,而造成无法unmirrorvg。以后要避免。
2、若在生产中,mirror出现问题,需要重做mirror时,最好按正常文档,先unmirrorvg再reducevg,再关机换盘,再做mirror。
3、一般情况下,若是mirror盘坏掉的情况,应该unmirrorvg没问题,若是母盘出现问题,有可以无法unmirrorvg。
问题解决:
在unmirrorvg , reducevg和rmlvcopy后都无法拆除mirror后,我用备份恢复的方法就解决了。
感谢大家!
作者: tie2003    时间: 2005-08-04 14:58
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "koala_mel" 发表:


restore is a good method.
but why not just use command to fix it? it is not that difficult and it can help us to understand LVM and such kind of things. it depend on that if  you want to learn som..........


thanks! koala_mel

I have lots of methods , including rmlvcopy, reducevg force=yes, and synclvodm,...... .  But that can not resolved. So I only use mksysb withno mirror infomation to restore the rootvg. and the mothod is more easy and less risk!
作者: tie2003    时间: 2005-08-04 17:20
标题: 请教高手:无法unmirrorvg,应怎么办!急
[quote]原帖由 "ibm6000"]这个问题以前遇到过,印象不深了,好象是用chlvcopy的[/quote 发表:

老大,这个问题你遇到过,能否经验共享啊!帮帮哥们吧!您在好好回想一下,给个提示也好啊,说用chlvcopy要改什么啊,我现在已经问题重现了,可以做实验的。
作者: koala_mel    时间: 2005-08-05 09:15
标题: 请教高手:无法unmirrorvg,应怎么办!急
he just wants to split the mirror copy. but your lv is in stale state. I am not sure if you can be successful.
作者: tie2003    时间: 2005-08-05 10:52
标题: 请教高手:无法unmirrorvg,应怎么办!急
[quote]原帖由 "koala_mel"]he just wants to split the mirror copy. but your lv is in stale state. I am not sure if you can be successful.[/quote 发表:

thanks!
I decide that we mksysb the rootvg and restore it . The mothed was tested successfully!
作者: tie2003    时间: 2005-08-05 11:42
标题: 请教高手:无法unmirrorvg,应怎么办!急
      
郁闷中!忿怒中!我已经做好了备份和恢复的方案,而且实验已经成功!但方案被否,说既然无法unmirrorvg那就重新加一个mirror,这样的话,以后会一直报错,想不通,既然有方法unmirror了,为什么不这样做呢。想不通!
事不于愿为!
作者: koala_mel    时间: 2005-08-05 13:38
标题: 请教高手:无法unmirrorvg,应怎么办!急
if I were your manager , I would not support you .
you should fix the issue instead of restore the system from the backup.
the backup is the last method.
restore from backup means no service for long time.
作者: beginner-bj    时间: 2005-08-05 13:51
标题: 请教高手:无法unmirrorvg,应怎么办!急
这样的问题,建议先看看AU16
作者: koala_mel    时间: 2005-08-05 14:21
标题: 请教高手:无法unmirrorvg,应怎么办!急
the paste should be closed now, it finished.
作者: meteor06    时间: 2005-08-08 09:35
标题: 请教高手:无法unmirrorvg,应怎么办!急
刚好一台机器的rootvg镜象盘坏了一块
按照以下步骤可以去掉镜象
synclvodm -v rootvg
smit unmirrorvg 做和楼主的错误提示一样
lspv -l pvid  (pvid 对应坏盘)
rmlvcopy lvname 1 pvid
......
unmirrorvg rootvg pvid
reducevg -d rootvg pvid
作者: tie2003    时间: 2005-08-08 11:33
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "meteor06" 发表:
刚好一台机器的rootvg镜象盘坏了一块
按照以下步骤可以去掉镜象
synclvodm -v rootvg
smit unmirrorvg 做和楼主的错误提示一样
lspv -l pvid  (pvid 对应坏盘)
rmlvcopy lvname 1 pvid
......
unmirrorvg roo..........


我也执行过synclvodm -v rootvg
并且也尝试过rmlvcopy,但rmlvcopy时同样报错。

上周,去采用备份的方式地做,但磁带机没有4263那根线就没有做,这周还得去,我可以再试一下。谢谢!
作者: tie2003    时间: 2005-08-09 15:03
标题: 请教高手:无法unmirrorvg,应怎么办!急
干活的时候一定要考虑清楚。
615的磁带机6158必须配4263线。没有线,没做成
作者: RS9000    时间: 2005-08-09 15:15
标题: 请教高手:无法unmirrorvg,应怎么办!急
呵呵,晕了吧,,,配线,先前一定要想到丫。。呵呵
作者: tie2003    时间: 2005-08-10 11:05
标题: 请教高手:无法unmirrorvg,应怎么办!急
[quote]原帖由 "RS9000"]呵呵,晕了吧,,,配线,先前一定要想到丫。。呵呵[/quote 发表:

是有些晕,之前已经通过一些途径确认没有问题的,可是。。。人算不如天算。

=========
靠别人不如靠自已
作者: tie2003    时间: 2005-08-18 14:01
标题: 请教高手:无法unmirrorvg,应怎么办!急
感谢各位!
目前问题已解决,采用备份恢复的方法。
提醒大家注意,AIX5L 备份恢复时boot image 12MB限制问题
作者: bocwg    时间: 2005-08-25 17:09
标题: 请教高手:无法unmirrorvg,应怎么办!急
原帖由 "tie2003" 发表:
各位高手,我已以做过实验,而且问题已经重现。
提醒大家注意:
1、因为我们做了大量的盘的mirrorvg,所以将每组盘插入新机器时,可以插错,不是一组盘,而造成无法unmirrorvg。以后要避免。
2、若在生产中,mirr..........

1、如果本来就不形成mirror,你拿什么来unmirror?
2、如果是stale mirror,那根据各位大虾的建议是可以unmirror的




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2