1. 程式人生 > >(轉)更換鏡像rootvg卷組中的硬盤

(轉)更換鏡像rootvg卷組中的硬盤

ram block 重新啟動 shu move 比較 rep 十分 ive

F85系統鏡像盤更換實錄之一:刪除原有鏡像操作

# cfgmgr

# lsdev -Cc disk

hdisk0 Available 11-09-00-8,0 16 Bit LVD SCSI Disk Drive

hdisk1 Available 11-09-00-10,0 16 Bit LVD SCSI Disk Drive

# lsvg

rootvg

# lsvg -p rootvg

rootvg:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdisk1 active 542 148 70..00..00..00..78

hdisk0 missing 542 148 70..00..00..00..78

# unmirrorvg rootvg hdisk0

0516-1246 rmlvcopy: If hd5 is the boot logical volume, please run ‘chpv -c <diskname>‘

as root user to clear the boot record and avoid a potential boot

off an old boot image that may reside on the disk from which this

logical volume is moved/removed.

0516-1132 unmirrorvg: Quorum requirement turned on, reboot system for this

to take effect for rootvg.

0516-1144 unmirrorvg: rootvg successfully unmirrored, user should perform

bosboot of system to reinitialize boot records. Then, user must modify

bootlist to just include: hdisk1.

# lsvg -p rootvg

rootvg:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdisk1 active 542 148 70..00..00..00..78

hdisk0 missing 542 542 109..108..108..108..109

# chpv -c hdisk0

# reducevg rootvg hdisk0

# lsvg -p rootvg

rootvg:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdisk1 active 542 148 70..00..00..00..78

# bootlist -m normal hdisk1

F85系統鏡像盤更換實錄之二:重建鏡像

lsdev -Cc disk

hdisk0 Available 11-09-00-8,0 16 Bit LVD SCSI Disk Drive

hdisk1 Available 11-09-00-10,0 16 Bit LVD SCSI Disk Drive

# lsvg -p rootvg

rootvg:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdisk1 active 542 148 70..00..00..00..78

# chdev -l hdisk0 -a pv=yes

hdisk0 changed

# extendvg rootvg hdisk0

0516-1398 extendvg: The physical volume hdisk0, appears to belong to

another volume group. Use the force option to add this physical volume

to a volume group.

0516-792 extendvg: Unable to extend volume group.

# extendvg -f rootvg hdisk0

# lsvg -p rootvg

rootvg:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdisk1 active 542 148 70..00..00..00..78

hdisk0 active 542 542 109..108..108..108..109

關掉rootvg的 QUORUM功能: (是否需要這個步驟)

#chvg -Qn rootvg

# mirrorvg rootvg

0516-1124 mirrorvg: Quorum requirement turned off, reboot system for this

to take effect for rootvg.

0516-1126 mirrorvg: rootvg successfully mirrored, user should perform

bosboot of system to initialize boot records. Then, user must modify

bootlist to include: hdisk0 hdisk1.

# bosboot -a -d /dev/hdisk0

bosboot: Boot image is 20904 512 byte blocks.

# bootlist -m normal hdisk1 hdisk0

# lsvg -p rootvg

rootvg:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdisk1 active 542 148 70..00..00..00..78

hdisk0 active 542 148 76..12..00..00..60

# exit

F85系統鏡像盤更換實錄之三:現場診斷及修復過程

1,登陸到F85主機,仔細查看錯誤日誌,確認系統鏡像盤hdisk0的故障:

# errpt

IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION

2F3E09A4 0801151907 I H hdisk0 REPAIR ACTION

16F35C72 0801083807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0801003807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0731163807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0731083807 P H hdisk0 DISK OPERATION ERROR

B6048838 0731051907 P S SYSPROC SOFTWARE PROGRAM ABNORMALLY TERMINATED

B6048838 0731043107 P S SYSPROC SOFTWARE PROGRAM ABNORMALLY TERMINATED

B6048838 0731041907 P S SYSPROC SOFTWARE PROGRAM ABNORMALLY TERMINATED

16F35C72 0731003807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0730163807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0730083807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0730003807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0729163807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0729083807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0729003807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0728163807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0728083807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0728003807 P H hdisk0 DISK OPERATION ERROR

16F35C72 0727163807 P H hdisk0 DISK OPERATION ERROR

2,打開機器前面板,根據硬盤使用繁忙程度(比較兩塊硬盤指示燈閃爍情況)初步判斷系統鏡像盤位於前面板右下側硬盤籠子中的一號插槽,三號插槽中為hdisk1;

3,為進一步確保判斷的準確性,請客戶停掉主機上的應用、關閉數據庫、關閉系統。待所有操作完成,打開硬盤籠子擋板,手工拔去一號插槽中的硬盤,重新啟動到系統,“lsdev –Cc disk”觀察hdisk0和hdisk1的狀態,hdisk0由上次的“available”變為“defined”,hdisk1沒有變化,則說明位於硬盤籠一號插槽中確為hdisk0;

4,根據服務手冊,硬盤籠中硬盤可熱插拔。在主機運行的情況下將拔出的硬盤插入一號插槽,合上硬盤籠擋板;

5,通過命令“cfgmgr”重新識別到hdisk0,“lsdev –Cc disk”查看hdisk0狀態轉為“available”,但在“lsvg –p rootvg”中查看物理盤hdisk0的狀態為“missing”而非“active”,表示仍然有問題;

6,對hdisk0進行刪除鏡像操作:

# unmirrorvg rootvg hdisk0(取消hdisk0對rootvg的鏡像)

# chpv -c hdisk0(清除引導區)

# reducevg rootvg hdisk0(將hdisk0從卷組中清除)

# bootlist -m normal hdisk1(重設啟動順序)

7,“lsvg –p rootvg”觀察,確認hdisk0已經脫離rootvg,打開硬盤籠擋板,拔出一號槽中的hdisk0,並將新帶來的36G硬盤插入到一號槽中,合上硬盤籠擋板。“cfgmgr”重新掃描硬件設備,“lsdev –Cc disk”查看新加硬盤在系統中顯示為“hdisk0”,且狀態為“available”,表示此硬盤可用;

8,對hdisk0進行鏡像操作:

# chdev -l hdisk0 -a pv=yes(將新硬盤設為可用)

# extendvg rootvg hdisk0(將hdisk0加入rootvg)

# mirrorvg rootvg(對rootvg進行鏡像,約二十分鐘後鏡像成功)

# bosboot -a -d /dev/hdisk0(在hdisk0上創建啟動映象)

# bootlist -m normal hdisk1 hdisk0(重新設置啟動順序)

9,通過命令“lsvg –p rootvg”查看確認hdisk0已經包含在rootvg中並處於“active”狀態,且使用pp數相同(一個pp等於64M):

# lsvg -p rootvg

rootvg:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdisk1 active 542 148 70..00..00..00..78

hdisk0 active 542 148 76..12..00..00..60

###############################################################################

替換rootvg中的磁盤

rootvg 中原來mirror的是 hdisk0 和 hdisk1,由於這兩塊磁盤是同一個BUS上的,我想換另外一個BUS上的磁盤,用hdisk4替換掉hdisk1

root用戶執行:

extend rootvg hdisk4

migratepv -l hd5 hdisk1 hdisk4 # 從hdisk1移到hdisk0

bosboot -ad /dev/hdisk4

chpv -c hdisk1

bootlist -m nornal hdisk0 hdisk4

sysdumpdev -p /dev/sysdumpnull

migratepv hdisk1 hdisk4

sysdumpdev -p /dev/hd6

reducevg rootvg hdisk1

shutdown -Fr

(轉)更換鏡像rootvg卷組中的硬盤