Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reducevg fails unmirrorvg fails also

Status
Not open for further replies.

normntwrk

MIS
Aug 12, 2002
336
0
0
US
We have a server that had hdisk0 and hdisk1 mirrored for rootvg. Server went down and wouldn't reboot (it should have as bootlist inluded hdisk1) Hdisk0 failed , replaced drive and machine came back up.

Tried reducevg using pvid to get rid of ghost drive, it wants me to close lvoo but hdisk1 is using that. Also tried unmirrorvg and got errors with that also

# reducevg -df rootvg 0040043a100b9b7
0516-1008 rmlv: Logical volume lv00 must be closed. If the logical
volume contains a filesystem, the umount command will close
the LV device.
0516-884 reducevg: Unable to remove physical volume 00040043a100b9b7.

0516-304 getlvodm: Unable to find device id 00040043a100b9b7 in the Device
Configuration Database.

unmirrorvg rootvg 00040043a100b9b7
0516-1155 lreducelv: Last good copy of a partition cannot reside on a missing di
sk.
Try again after reactivating the disk using chpv and varyonvg.
0516-922 rmlvcopy: Unable to remove logical partition copies from
logical volume lv00.
0516-1135 unmirrorvg: The unmirror of the volume group failed.
The volume group is still partially or fully mirrored.
# any ideas?

 
Hi.
Try the following to fix the problem.

lspv

hdisk0 00522d5f22e3b29d rootvg
hdisk1 00522d5f90e66fd2 rootvg
hdisk2 00522df586d454c3 datavg

lsvg -l rootvg

rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd6 paging 4 8 2 open/syncd N/A
hd5 boot 1 2 2 closed/syncd N/A
hd8 jfslog 1 2 2 open/syncd N/A
hd4 jfs 1 2 2 open/syncd /
hd2 jfs 12 24 2 open/syncd /usr
hd9var jfs 1 2 2 open/syncd /var
hd3 jfs 2 4 2 open/syncd /tmp
hd1 jfs 1 2 2 open/syncd /home



1, Reduce the logical volume copies from both disks to hdisk1 only :-

rmlvcopy hd6 1 hdisk0
rmlvcopy hd5 1 hdisk0
rmlvcopy hd8 1 hdisk0
rmlvcopy hd4 1 hdisk0
rmlvcopy hd2 1 hdisk0
rmlvcopy hd9var 1 hdisk0
rmlvcopy hd3 1 hdisk0
rmlvcopy hd1 1 hdisk0

2, Check that no logical volumes are left on hdisk0 :-

lspv -p hdisk0

hdisk0:
PP RANGE STATE REGION LV ID TYPE MOUNT POINT
1-101 free outer edge
102-201 free outer middle
202-301 free center
302-401 free inner middle
402-501 free inner edge

3, Remove the volume group from hdisk0

reducevg -df rootvg hdisk0

4, Recreate the boot logical volume on hdisk1, and reset bootlist:-

bosboot -a -d /dev/hdisk1
bootlist -m normal rmt0 cd0 hdisk1

5, Check that everything has been removed from hdisk0 :-

lspv

hdisk0 00522d5f22e3b29d None
hdisk1 00522d5f90e66fd2 rootvg
hdisk2 00522df586d454c3 datavg

6, Delete hdisk0 :-

rmdev -l hdisk0 -d
 
the first part of that procedure fails

Replacing a failed PV when the configuration does not allow the use of the replacepv command
Assume that the failed physical volume, hdisk0, and its mirror, hdisk1, are part of the yourvg volume group.

1. To remove mirror copies from the failed PV, run the following command:

unmirrorvg yourvg hdisk0

At this point I can't even do a mksysb..........

0516-304: Unable to find Device id 00040043a100b9b7 in the Device Configuration Database


 
this is what I've got, it just is messed up
sepnew1# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 16 32 2 open/stale N/A
hd8 jfslog 1 2 2 open/stale N/A
hd4 jfs 1 2 2 open/stale /
hd2 jfs 58 116 2 open/stale /usr
hd9var jfs 1 2 2 open/stale /var
hd3 jfs 2 4 2 open/stale /tmp
hd1 jfs 1 2 2 open/stale /home
hd10opt jfs 1 2 2 open/stale /opt
lv00 jfs 369 738 2 open/stale /work
sepnew2# lspv
hdisk0 00040043bbf53c7e None
hdisk1 00040043def4a388 rootvg active

sepnew5# lslv -l hd6
0516-304 : Unable to find device id 00040043a100b9b7 in the Device
Configuration Database.
hd6:N/A
PVID COPIES IN BAND DISTRIBUTION
00040043a100b9b7 016:000:000 100% 000:016:000:000:000
hdisk1 016:000:000 100% 000:016:000:000:000
 
I went through and used the rmlvcopy command for all the lv's and then the unmirrorvg and reducevg commands ran OK

Thanks, looks much better

# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 542 91 00..00..00..00..91


# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk1 rootvg 512MB 14 yes yes lv



# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 16 16 1 open/syncd N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd4 jfs 1 1 1 open/syncd /
hd2 jfs 58 58 1 open/syncd /usr
hd9var jfs 1 1 1 open/syncd /var
hd3 jfs 2 2 1 open/syncd /tmp
hd1 jfs 1 1 1 open/syncd /home
hd10opt jfs 1 1 1 open/syncd /opt
lv00 jfs 369 369 1 open/syncd /work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top