Wednesday, January 14, 2009

Rootvg disk replacement procedure

root$ lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 546 78 33..11..00..00..34
hdisk1 missing 546 119 09..16..00..00..94

root$ lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 6 2 closed/stale N/A
hd6 paging 64 128 2 open/stale N/A
hd8 jfs2log 1 2 2 open/stale N/A
hd4 jfs2 2 4 2 open/stale /
hd2 jfs2 32 64 2 open/stale /usr
hd9var jfs2 5 10 2 open/stale /var
hd3 jfs2 16 32 2 open/stale /tmp
hd1 jfs2 3 6 2 open/stale /home
hd10opt jfs2 5 10 2 open/stale /opt
appllv jfs2 14 28 2 open/stale /appl
nsrlv jfs2 1 2 2 open/stale /nsr
hd7x sysdump 46 46 1 open/syncd N/A
hd7 sysdump 46 46 1 open/syncd N/A
lv00 jfs 41 41 1 closed/syncd N/A
loglv00 jfslog 1 2 2 open/stale N/A


root$ lslv -l hd7x
hd7x:N/A
PV COPIES IN BAND DISTRIBUTION
hdisk1 046:000:000 0% 000:000:000:031:015


A) Description:

From above outputs its clear that hdisk1 is in missing state. It has either failed or had some stale partitions. Also we see that there is a Secondary Dump device which is created on hdisk1.

B) Pre-replacement steps:

** varyonvg rootvg --> This will solve the problems of stale partitions if any.

If above step shows right status hdisk1 dont need replacement.

Else log a call with IBM, send snap -gc and confirm with them hdisk1 has failed and plan replacement accordingly.

C) Steps while replacing the disk in rootvg:

1) touch /dev/sysdumpnull --> Make a null Sysdump device.
2) sysdumpdev -Ps /dev/sysdumpnull --> Change the secondary dump device null.
3) rmlv hd7x --> Remove Secondary Dump device from hdisk1.
4) unmirrorvg rootvg hdisk1 --> Break the mirror.
5) reducevg rootvg hdisk1 --> Remove hdisk1 from rootvg
6) After step 5 hdisk1 can be removed. Let IBM do the replacement of the disk. Once its replaced configure the disk again on the server
cfgmgr -v
7) lspv | grep -i hdisk | grep -i none | more --> Check name of the new hdisk.
8) extendvg rootvg newdiskname --> Add the new disk to rootvg.
9) mirrorvg rootvg newdiskname --> Mirror the new disk.
10) varryonvg rootvg --> Synchronizing the Volume Group.
11) bootlist -m normal -o --> Check the current bootlist.
12) bosboot -ad /dev/hdisk0 --> Update the boot image again.
13) bosboot -ad /dev/newdiskname --> Update the boot image for new disk.
14) bootlist -m normal hdisk0 hdisk1 --> Set the bootlist again.
15) create a lv hd7x (secondary sysdump) on the new disk according to the previous size of the dump device.
16) sysdumpdev -Ps /dev/hd7x --> Assign hd7x as secondary dump device.


D) Sometimes while replacing the disks IBM has wrong disk location. If you want to give an indication to the IBM CE with the right disk to be replaced you can do below:

diag --> Task Selection (Diagnostics, Advanced Diagnostics, Service Aids, etc.) --> Hot Plug Task --> SCSI and SCSI RAID Hot Plug Manager -->

LIST SCSI HOT SWAP ENCLOSURE DEVICES 802482

The following is a list of SCSI Hot Swap Enclosure Devices. Status information
about a slot can be viewed.

Make selection, use Enter to continue.

U7879.001.DQD16J9-
ses0 P1-T14-L15-L0
slot 1 [empty slot]
slot 2 [empty slot]
slot 3 [empty slot]

U7879.001.DQD16J9-
ses1 P1-T12-L15-L0
slot 1 P1-T12-L5-L0 hdisk1
slot 2 P1-T12-L4-L0 hdisk0
slot 3 [empty slot]


Here you can select the right location and give an Indicator to IBM.