Operating System - HP-UX
1844843 Members
2598 Online
110233 Solutions
New Discussion

Online Mirror Boot Disk Replacement Clarification

 
Jov
Honored Contributor

Online Mirror Boot Disk Replacement Clarification

Hi Guys,

Over the weekend I do a migration of disks from one server to another, but (pretty) sure when I was replacing the alt (secondary) boot disk to mirror vg00 I was not able to succesfully execute "mkboot /dev/rdsk/cXtXdx" on a new disk.

According the some official sources, texts and forum answers, to replace a boot disk, execute the following:

# vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtXdx

# vgchange -a y /dev/vg00 # This might or shure not be required given system is still up

# vgsync /dev/vg00

Now the boot disk is mirrored, update the boot block:

# mkboot -v /dev/rdsk/cXtXdx

# mkboot -a "hpux -lq" /dev/rdsk/cXtXdx

The issue I recall was the above failed because the new disk did not have the boot area created with "pvcreate -B".

Has anyone had success replacing a mirror boot disk while online with the above procedure without using "pvcreate -B"?

If pvcreate is required, then the above procedure is invalid as most if not all new disks will not have the boot area created.


Jov
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Online Mirror Boot Disk Replacement Clarification

The vgcfgrestore command does the work of a pvcreate (with or without -B depending upon the vgcfgbackup image) plus additional LVM work so that no explicit pvcreate is needed. In fact, if a pvcreate is done after the vgcfgrestore then you have destroyed data.
If it ain't broke, I can fix that.
Jov
Honored Contributor

Re: Online Mirror Boot Disk Replacement Clarification

Hi A. Clay,

Thanks for the quick response. I am pretty sure I did a vgcfgrestore, but can not be 100% sure given the late hours.

I'll test it again when I get the chance.

Since I have you attention, there is another interesting behaviour I noticed with LVM. The system was attached to a FC60 with 2 SC10, thus provided 2 LUNs (via 2 Fibre cards) to the server. Each LUN has an alternate link and the VG has for for example the follwing PV setup:

PV1 /dev/dsk/c10t0d4
/dev/dsk/c12t0d4 Altermate Link

PV2 /dev/dsk/c10t0d0
/dev/dsk/c12t0d0 Altermate Link

I changed the PV2 with pvchange -s to use /dev/dsk/c12t0d0 (thus utilising both FCs) as the primary sucessfully, thus vgdisplay -v showed:

PV1 /dev/dsk/c10t0d4
/dev/dsk/c12t0d4 Altermate Link

PV2 /dev/dsk/c12t0d0
/dev/dsk/c10t0d0 Altermate Link

What was interesting was this changed to back to its original state after a reboot.

Was this be due to the fact it didn't save the pvchange or new vg state?

I thought pvchange does an auto-backup of the change, no?


Jov
Devender Khatana
Honored Contributor

Re: Online Mirror Boot Disk Replacement Clarification

Hi,

Allthough I do not restore the mirrored boot disks using vgcfgrestore as it is not a HP supported method of doing it for a root disk atleast, it has to be done having recreate the mirror all over again.

For the other question, you should have been used

#pvchange -S n /dev/dsk/c12t0d0
as
#pvchange -s /dev/dsk/c12t0d0

Will use the other path but revert to original path.

Just see if it works even after reboot/reactivation of the VG. To test this reboot is in fact not required. Just deactivae and activate back the VG. The behaviour should be same as will be on reboot.

HTH,
Devender
Impossible itself mentions "I m possible"
Jov
Honored Contributor

Re: Online Mirror Boot Disk Replacement Clarification

Hi Devender,

Thanks for the reply. From your response regarding the boot disk, you're saying the failed boot disk should be removed/reduce from vg00 (as pvcreate will not work unless the -f is used), and then start the boot disk mirroring process from scratch?

So what official procedure does HP support?

As for the alternate link question you're right, I should have used "-S n". I missed it under the circumstances and late night.

Thanks.


Jov

Devender Khatana
Honored Contributor

Re: Online Mirror Boot Disk Replacement Clarification

Hi,

The supported method of replacing a mirrored boot disk is to reduce it from the VG, then replace and then do the complete mirroring procedure all over again.

The same is also mentioned here in official disk replacement guide
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

HTH,
Devender
Impossible itself mentions "I m possible"
Jov
Honored Contributor

Re: Online Mirror Boot Disk Replacement Clarification

Hi Devender,

Thanks for the reply. I am aware of the PDF, but wanted to see if there was another official source.


Cheers

Jov
Jov
Honored Contributor

Re: Online Mirror Boot Disk Replacement Clarification

No more info required.