停電導致aix檔案系統掛載問題

shilei1發表於2015-04-13
今天機房停電了,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
查詢資料得時候看到有人提示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.

試著執行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.
傻眼了,再嘗試 varyonvg backupvg
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.
還是失敗。
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
經過忐忑的等待,搞定!
然後mount
哇卡卡,運氣真好,資料都在
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
經驗教訓
1.不熟悉的命令不能亂用
2.exportvg之後pv也被刪了,不知道為啥
3.遇事不要慌,吉人自有天相

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-1570945/,如需轉載,請註明出處,否則將追究法律責任。

相關文章