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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to fix mirrored lvs when a drive is replaced? 1

Status
Not open for further replies.

wab62

MIS
Mar 28, 2002
18
US
AIX 4.3.3

System originally had hdisk0 and hdisk1, both 18gb drives. All lvs on hdisk0 had a mirror copy on hdisk1. boot lvm was created on hdisk1 as well.

Hdisk0 began reporting errors, IBM FE replaced hdisk0. System was booted from hdisk1.

Now when I try to rebuild hdisk0, there apparently are still references to the original hdisk0:

(root)/> bosboot -a -d /dev/hdisk0
0516-304 lslv: Unable to find device id 0009448fa2ef738e in the Device
Configuration Database.


0301-111 /usr/lib/boot/bin/mkboot_chrp: error on Object Data Manager routine "od
m_get_first"

0301-158 bosboot: mkboot failed to create bootimage.

0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.

device id 0009448fa2ef738e is the original hdisk0 that was replaced.

Similar problems when trying to rmlvcopy. System thinks there's still a copy on the disk that was replaced.

How do I get the odm back into sync? Thanks for your time and assistance.

-- wab62


 
Did you mirror hdisk1 to hdisk0? You cannot do a bosboot for hdisk0 unless you have mirrored it. So mirror hdisk1 to hdisk0; bosboot -ad /dev/hdisk0 (or hdisk1); bootlist -m normal hdisk0 hdisk1 (whichever is listed first when doing lslv -l hd5).
 
hd5 was a bad example of the problem, because it is a special case for mirroring.

hd1 (/home) is a good example. Currently I only have 1 valid copy of this lv on hdisk1. lslv hd1 shows there are 2 copies, because it's still configured for mirroring on the disk that was replaced. If I try to reduce the mirror copies to 1,

(root)/> rmlvcopy hd1 1
0516-1155 lreducelv: Last good copy of a partition cannot reside on a missing disk.
Try again after reactivating the disk using chpv and varyonvg.
0516-922 rmlvcopy: Unable to remove logical partition copies from logical volume hd1.

if I add hdisk0 to the command line,

(root)/> rmlvcopy hd1 1 hdisk0
0516-681 rmlvcopy: Name provided is of illegal length or content.
0516-922 rmlvcopy: Unable to remove logical partition copies from logical volume hd1.

I think the part about "last good copy" is because lslv hd1 shows LV STATE: opened/stale

I think I can migrate these lvs to hdisk0, and reconfigure mirroring for each lv from hdisk0 to hdisk1. But the lvodm will then indicate 3 copies for each; hdisk0, hdisk1, and the old, missing, original hdisk0.

Suggestions? Thanks again.

-- wab62

 
If it was me in your shoes, I think I'd try and undo anything you've set up on the new hdisk0, and then delete it for the time being....just until you've removed all traces of the old disk. Too confusing otherwise.

You should then be able to:
rmlvcopy hd1 0009448fa2ef738e

and so on for the other lv's.
Then remove hdisk0 from rootvg:
reducevg -d rootvg hdisk0

...and then from the system:
rmdev -dl hdisk0

Then re-introduce your new disk:
cfgmgr

...and from here on the rest should be pretty standard disk intro / mirroring work.

HTH
Mark
 
the rmlvcopy worked when I used the pvid of the removed hard drive.

Thanks for the advice. Only one small problem left, with the dumpdevice.

When you attempt to assign the primary dump device, you get;

(root)/var/adm/ras> sysdumpdev -p /dev/hd6
sysdumpdev:
0453-054 Unable to get physical volume name for from ODM.

hd6 is mirrored and exists on hdisk0 and hdisk1. created an umirrored lv called hd7, but sysdumpdev -p comes back with the same error with that device. Any thoughts?

 
Maybe because the -p is for a temporary change, so it still keeps a reference in the ODM to the previous device. You could try:
sysdumpdev -P -p /dev/hd7
to make it permanent. Hopefully it won't care about a previous value. ( BTW - shouldn't the primary dump device be unmirrored anyway? )

If that doesn't work, you could be in the realms of ODM manipulation, and someone with more experience than me would need to advise you there. The dump devices are defined in the SWservAt ODM object class, if that helps.

Good Luck
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top