Operating System - HP-UX
1834195 Members
2832 Online
110064 Solutions
New Discussion

Please comment on this concern questions

 
SOLVED
Go to solution
hpuxhelp
Regular Advisor

Please comment on this concern questions

Let me rephrase my question in regards to disk mirrorring.
*** I want to update patches and want to using this
method : lvreduce and vgreduce. ( i am currently testign this ). however, thank you for your
suggestion on using lvslit



2 disks : one is primary and one is secondary. The primary disk is diskA and secondary disk is
diskB. Create a mirror for them. So, let say that I went through the testing process to make sure I
can boot on the primary and secondary. Now, currently, the system is boot on primary device. Here
is what i want to accomplish at this point :
1. I want to break the mirror for this vg.
2. then vgreduce the primary disk (diskA) out of the volume group. This will leave the vgxx with only
diskB.
3. Since now the diskA no longer part of the vg, I have to change the boot using (set boot command
) to set the primary boot to the h/w path of the secondary disk (diskB).
*** I am right on this?
4. So, once if this has been successfully update, I can
bring diskA back and mirror it.
*** How do I know if I am mirroring the new information vs the old information?
** Please check on the step...
pvcreate -B -f /dev/rdsk/cxtxdx...
** If the disk is created without the -f, doesn't it mean it still have information on it. If using pvcreate
with -f then, it will initialize the disk and all the information pertains to the disks are no longer
available.
** If I am correct on this...
then when to add the disk back and redo the mirroring then -f will be needed. this will do the
mirroring of the new information. Is this how to check it ?
-- the rest of the steps on how to create a mirrorI have it under control... :)


5. What if after you have been successfully boot up the system by the secondary disk (diskB), and
update the patches and during this process, you screw up very bad causes this disk no longer boot.
Now I want to be able to use the mirror on the primary disk to go back where it was from the
begining. How would I accomplish this?
would vgcfgrestore work?
I can't use lvextend to extend the bad mirror... so how do I go back to use the good mirror disk that
has been remove earlier as I stated...


thank you.
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Please comment on this concern questions

Hi,

This process will not work. This is because you are basically reducing the mirrors and taking out the boot disk out of vg00. You may be able to boot from it. But there is no guarantee it will work.

I would suggest you to rely on make_tape_recovery process for the backout process. You can try "lvsplit" process but you have to be very careful with the lvlnboot command.

I can suggest one more method. You can use it only if you have hot-pluggable feature like Jamaica or RPclass server. But you have to be confident and thorough with LVM to attempt it. I use it very often here without a single issue but it has received a lot of negative responses in these forums.

Make sure you have make_tape_recovery tape.

Make sure both the disks have the autostring "hpux -lq" and are not hardcoded with the paths.

lifcp /dev/dsk/diskA:AUTO -

Have another disk of same size as of your boot disks handy. Replace the secondary disk (diskB) with this online. Do the following.
#lvlnboot -v (note the output)
#ioscan -f
#vgcfgrestore -n /dev/vg00/diskB
#vgchange -a y vg00
#mkboot -b /dev/rdsk/diskB
#mkboot -a "hpux -lq" /dev/rdsk/diskB
#vgsync
(run lvlnboot commands as noted in the above lvlnboot output)

This will get you the mirrors back. But you have the stolen mirror as a backout plan. So go ahead and install patches. In case of failures, you can take out the disks and boot form the old disk. After booting put another disk and do the same vgcfgrestore to get the mirrors back.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Martin Johnson
Honored Contributor

Re: Please comment on this concern questions

If diskB is a mirror of diskA and also includes all the boot info, you should be able off of either disk. To test, boot off of both disks.
1 & 2. Yes, break the mirror using lvreduce, then vgreduce
3. Yes, you have to change the primary boot path, or if you have the other disk defined as the alternate boot path, you can boot up on the alternate path.
4. You are booted on diskB. Apply the upgrade/patches to diskB. If successful, add diskA back to the volume group. I would do a pvcreate -B -f diskA prior to the vgextend, then add the boot info, the lvextend the logical volumes back on diskA. You are booted on diskB. This is your primary disk and the info on it will be mirrored to diskA.

5. If your upgrade/patches are not successful, you shutdown on diskB and boot up on diskA. You either reset diskA as your primary boot patch, or if you booted diskB from an alternate path, just boot from your primary path. After this system is booted abck on diskA, initialize diskB and add back to the mirror.

HTH
Marty
Dave Wherry
Esteemed Contributor

Re: Please comment on this concern questions

You do not have to vgreduce.
If you split the mirror and reduce Disk A out of the volume group. Then have a problem with the patches on Disk B and try to boot from Disk A, how will the OS know about it if it is not in a volume group? The system is dead.
Just do the lvsplit and boot from Disk B. There used to be a document on the ITRC that expalined it all. The document ID is X1401978. Search for that and it should answer all of your questions.
I've done a good deal of split mirror testing for upgrades and patches. It is fast and works very well. However, do the make_tape_recovery as a secondary fallback. If you make a mistake with the LVM commands you will have nothing without the tape.