更換HP小型機系統映象故障盤

sundayhe發表於2011-05-19

1 1、告警資訊

fep2#[/]lvdisplay -v /dev/vg00/lvol3

--- Logical volumes ---

LV Name /dev/vg00/lvol3

VG Name /dev/vg00

LV Permission read/write

LV Status available/stale

Mirror copies 1

Consistency Recovery MWC

Schedule parallel

LV Size (Mbytes) 140

Current LE 35

Allocated PE 70

Stripes 0

Stripe Size (Kbytes) 0

Bad block off

Allocation strict/contiguous

IO Timeout (Seconds) default

--- Distribution of logical volume ---

PV Name LE on PV PE on PV

/dev/dsk/c1t2d0 35 35

/dev/dsk/c2t2d0 35 35

--- Logical extents ---

LE PV1 PE1 Status 1 PV2 PE2 Status 2

0000 /dev/dsk/c1t2d0 1045 current /dev/dsk/c2t2d0 1045 stale

0001 /dev/dsk/c1t2d0 1046 current /dev/dsk/c2t2d0 1046 current

0002 /dev/dsk/c1t2d0 1047 current /dev/dsk/c2t2d0 1047 current

0003 /dev/dsk/c1t2d0 1048 current /dev/dsk/c2t2d0 1048 current

0004 /dev/dsk/c1t2d0 1049 current /dev/dsk/c2t2d0 1049 stale

2、2、 原因分析

根據syslog.log以及vgdisplay –v 的顯示資訊,確定為/dev/dsk/c2t2d0根盤故障,需要更換,由於FEP的兩塊根盤作了映象因此可以進行線上更換。

二、 3、更換步驟

兩塊根盤作了映象,可以進行線上更換

1、 使用strings /etc/lvmtab 確認故障根盤對應的vgvg00(和ioscan結果相對應)

2、 摘除/dev/dsk/c2t2d0mirrorlv

#lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c2t2d0

#lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c2t2d0

#lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/c2t2d0

#lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/c2t2d0

#lvreduce -m 0 /dev/vg00/lvol5 /dev/dsk/c2t2d0

#lvreduce -m 0 /dev/vg00/lvol6 /dev/dsk/c2t2d0

#lvreduce -m 0 /dev/vg00/lvol7 /dev/dsk/c2t2d0

#lvreduce -m 0 /dev/vg00/lvol8 /dev/dsk/c2t2d0

#lvreduce -m 0 /dev/vg00/volss7 /dev/dsk/c2t2d0

vgreduce –f vg00

lvreduce -m 0 -k 1 /dev/vg00/lvol1

lvreduce -m 0 -k 1 /dev/vg00/lvol2

lvreduce -m 0 -k 1 /dev/vg00/lvol3

lvreduce -m 0 -k 1 /dev/vg00/lvol4

lvreduce -m 0 -k 1 /dev/vg00/lvol5

lvreduce -m 0 -k 1 /dev/vg00/lvol6

lvreduce -m 0 -k 1 /dev/vg00/lvol7

lvreduce -m 0 -k 1 /dev/vg00/lvol8

lvreduce -m 0 -k 1 /dev/vg00/volss7

3、 摘除vg00中的/dev/dsk/ c2t2d0

# vgreduce vg00 /dev/dsk/c2t2d0

vgreduce不成功的解決方法:

#cp /etc/lvmtab /etc/lvmtab20090625

#rm /etc/lvmtab

#vgscan –v

故障盤自動不再加入到/etc/lvmtab

4、 更換根盤(線上熱插拔)

可使用dd if=/dev/rdsk/c2t2d0 of=/dev/null bs=1024k狀態燈閃來確定根盤的位置

5、 /dev/rdsk/c2t2d0建立新的pv

#pvcreate -B -f /dev/rdsk/c2t2d0 其中引數–B將該盤設定為可啟動根盤

6、 /dev/dsk/c2t2d0加入到vg00

#vgextend /dev/vg00 /dev/dsk/c2t2d0

7、 設定/dev/rdsk/c2t2d0的啟動引導資訊

# mkboot -l /dev/rdsk/c2t2d0

#mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/c2t2d0

8、 vg00中所有lv都映象到/dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t2d0

# lvextend -m 1 /dev/vg00/volss7 /dev/dsk/c2t2d0

9、 確認以上資訊是否都正確建立。

#ioscan -fnC disk

#lvdiplay –v

#lvlnboot -R /dev/vg00

#lvlnboot -v

#setboot –v

10、檢查系統有無告警。

更換完成

[@more@]

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

相關文章