今天机房停电了,ups供电能力不足,于是把一个阵列关掉了,当然最后也没撑住,服务器还是挂了。
后来供电正常了,服务器正常了,却发现有关文件系统没找到,原来那个阵列没起来。
于是先运行mount,提示设备不存在。
于是lsvg查看,找出对应得vg
lsvg xxvg提示需要varyon
于是运行varyonvg,提示The volume group cannot be varied on because
there are no good copies of the descriptor area
there are no good copies of the descriptor area
查找资料得时候看到有人提示exportvg,然后importvg就好了
于是不知死活的就运行了exportvg
结果运行importvg的时候提示
0516-082 lqueryvg: Unable to access a special device file.
Execute redefinevg and synclvodm to build correct environment.
0516-082 lqueryvg: Unable to access a special device file.
Execute redefinevg and synclvodm to build correct environment.
0516-1140 importvg: Unable to read the volume group descriptor area
on specified physical volume.
Execute redefinevg and synclvodm to build correct environment.
0516-082 lqueryvg: Unable to access a special device file.
Execute redefinevg and synclvodm to build correct environment.
0516-1140 importvg: Unable to read the volume group descriptor area
on specified physical volume.
试着运行importvg -y vgname hdiskxx
提示0516-024 lqueryvg: Unable to open physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
0516-024 lqueryvg: Unable to open physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
0516-1140 importvg: Unable to read the volume group descriptor area
on specified physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
0516-024 lqueryvg: Unable to open physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
0516-1140 importvg: Unable to read the volume group descriptor area
on specified physical volume.
傻眼了,再尝试 varyonvg backupvg
0516-008 varyonvg: LVM system call returned an unknown
error code (3).
0516-008 varyonvg: LVM system call returned an unknown
error code (3).
根据前面的提示运行redefinevg -d hdisk2 backupvg
0516-024 : Unable to open physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
运行synclvodm -P -v backupvg
0516-306 : Unable to find volume group backupvg in the Device
Configuration Database.
0516-502 synclvodm: Unable to access volume group backupvg.
# lqueryvg -Atp hdisk2
0516-320 lqueryvg: Physical volume hdisk2 is not assigned to
a volume group.
0516-024 lqueryvg: Unable to open physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
0516-024 : Unable to open physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
运行synclvodm -P -v backupvg
0516-306 : Unable to find volume group backupvg in the Device
Configuration Database.
0516-502 synclvodm: Unable to access volume group backupvg.
# lqueryvg -Atp hdisk2
0516-320 lqueryvg: Physical volume hdisk2 is not assigned to
a volume group.
0516-024 lqueryvg: Unable to open physical volume.
Either PV was not configured or could not be opened. Run
diagnostics.
还是失败。
lsvg发现vg没了
lspv发现pv也没了
这才发现事态的严重性,赶紧查资料找人求助,发现exportvg实际是删除vg,傻了
不敢再做啥了,赶紧找人帮忙,发现有资料说可以恢复
于是赶紧查找硬件信息
odmget -q name=hdisk2 CuAt
高手说只能重建vg。
后来查看lspv发现pv没了,就lsdev -Cc disk
发现
hdiskxx Defined 11-08-L SSA Logical Disk Drive
运行cfgmgr
然后lsdev -Cc disk发现硬件正常了。
于是运行importvg backupvg
0516-082 lqueryvg: Unable to access a special device file.
Execute redefinevg and synclvodm to build correct environment.
0516-082 lqueryvg: Unable to access a special device file.
Execute redefinevg and synclvodm to build correct environment.
0516-1140 importvg: Unable to read the volume group descriptor area
on specified physical volume.
于是再运行importvg -y bakcupvg hdisk2
0516-082 lqueryvg: Unable to access a special device file.
Execute redefinevg and synclvodm to build correct environment.
0516-082 lqueryvg: Unable to access a special device file.
Execute redefinevg and synclvodm to build correct environment.
0516-1140 importvg: Unable to read the volume group descriptor area
on specified physical volume.
于是再运行importvg -y bakcupvg hdisk2
经过忐忑的等待,搞定!
然后mount
哇卡卡,运气真好,资料都在
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
经验教训
1.不熟悉的命令不能乱用
2.exportvg之后pv也被删了,不知道为啥
3.遇事不要慌,吉人自有天相