1834495 Members
2868 Online
110067 Solutions
New Discussion

Re: Mirror OS

 
Jeffrey F. Goldsmith
Super Advisor

Mirror OS

I have an L2000 server with HP-UX 11.0 installed. Last week I was in the process of upgrading my OS to HP-UX 11.i when I ran into a lv size problem. I have two hard drives in my server and they were mirrored. Prior to starting the upgrade I broke the mirror and then booted on the second drive. When I found that I wasn't able to finish the install I booted the server on the first drive.
I was told that the next time that I will be able to do the upgrade the server will be in the middle of January.
I need to re-mirror my drives and don't know how to do that. Could someone give me the steps to perform the task? Can I mirror the drives without having to boot my server?
Thanks for the help.
11 REPLIES 11
Pete Randall
Outstanding Contributor

Re: Mirror OS

It's just the same as when you originally mirrored it - the pvcreate will destroy the LVM structures left behind by the install:

The steps to mirror your boot volume are:

1. Create a physical volume with a boot reserved area
"pvcreate -B /dev/rdsk/c1t6d0"

2. Add the physical volume to the root VG
"vgextend /dev/vg00 /dev/dsk/c1t6d0"

3. Use mkboot to place the boot utilities in the boot area and add the AUTO file
"mkboot /dev/rdsk/c1t6d0"
"mkboot -a "hpux -lq" /dev/rdsk/c1t6d0"

4. Use mkboot to update the AUTO file on the primary boot disk
"mkboot -a "hpux -lq" /dev/rdsk/c0t6d0"

5. Mirror the stand, root and swap logical volumes
"lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t6d0"
Repeat for other lvols

6. Modify your alternate boot path
"setboot -a 8/8.6.0 # use the path of your new boot disk"

7. Edit /stand/bootconf and add your new mirrored boot disk.

That's all there is to it. You may notice that I left out any lvlnboot commands
. That is because they are not necessary - see the man page:

"This command should be run in recovery mode (-R) whenever the configuration of
the root volume group is affected by one of the following commands: lvextend, lv
merge, lvreduce, lvsplit, pvmove, lvremove, vgextend, or vgreduce (see lvextend(
1M), lvmerge(1M), lvreduce(1M), lvsplit(1M), pvmove(1M), lvremove(1M), vgextend(
1M), and vgreduce(1M)). Starting with HP-UX Release 10.0, this is done automatic
ally."


Pete

Pete
Tim D Fulford
Honored Contributor

Re: Mirror OS

Just to add to Petes reply.

It is imperative that lvol1, lvol2 & lvol3 are mirrored in the correct order (as above) otherwise the system may not boot.

Regards

Tim
-
Jeffrey F. Goldsmith
Super Advisor

Re: Mirror OS

Pete, I took the information you gave me and made the changes to reflect my system. I am attaching a doc so that you can look it over to see if I made the correct changes. The only thing I don't understand is #6. I am also giving a copy of my /stand/bootconf. Also, what do you mean about running this command in recovery mode?
Tim D Fulford
Honored Contributor

Re: Mirror OS

Hi

could you also post

vgdisplay -v vg00

Tim
-
Pete Randall
Outstanding Contributor

Re: Mirror OS

Jeffery,

I couldn't open your attachment, but I'm sure if all you did was change devices to fit your disk drive situation, it will be fine.


Step # 6 alters your alternate boot path to point to the new mirror. That way, if the primary fails, a re-boot should automatically go to the mirror, assuming autoboot and autosearch are enabled.

The mention of recovery mood is from the man page for lvnboot. People tend to include a lvlnboot step in their mirroring instructions, but it's not necessary and I was just quoting the lvlnboot man page to show that isn't required.


Pete

Pete
Tim D Fulford
Honored Contributor

Re: Mirror OS

Hi

to the /stand/bootconf add
l /dev/dsk/c2t2d0.

The lvlnbot command is to ensure it is possible to boot form both disks.

lvlnboot -Rv
(please post out put too)

Regards

Tim
-
Pete Randall
Outstanding Contributor

Re: Mirror OS

Jeffery,

OK, I managed to open the attachment. It looks good to me except you've skipped lvol2 in the lvextend steps - probably because it's swap and you didn't notice it. It's import that lvol1, 2, and 3 be mirrored in exactly that order.

Your /stand/bootconf should also have your /dev/dsk/c2t2d0 listed in it.


Pete

Pete
Tim D Fulford
Honored Contributor

Re: Mirror OS

Hmmm.

As Pete (& I) pointed out it is important to mirror lvols1,2,3 in that order. You will need to lvreduce lvol's 3-8 & re-mirror. DONT just try & mirror lvol2.

The only "special" thing that "could" be done with lvol2 to improve performance (well do less writing) is to turn off mirror write cache consistency (lvchange -M n /dev/vg00/lvol2), but I'm not sure that this is really such a great idea...

Regards

Tim
-
Jeffrey F. Goldsmith
Super Advisor

Re: Mirror OS

Here is the vgdisplay that was requested:

root: / ==> vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 2500
VGDA 2
PE Size (Mbytes) 4
Total PE 2169
Alloc PE 2107
Free PE 62
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 180
Current LE 45
Allocated PE 45
Used PV 1

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 256
Used PV 1

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 200
Current LE 50
Allocated PE 50
Used PV 1

LV Name /dev/vg00/swap01
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 256
Used PV 1

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 600
Current LE 150
Allocated PE 150
Used PV 1

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 400
Current LE 100
Allocated PE 100
Used PV 1

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 250
Used PV 1

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 1300
Current LE 325
Allocated PE 325
Used PV 1

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 2400
Current LE 600
Allocated PE 600
Used PV 1

LV Name /dev/vg00/lpreq
LV Status available/syncd
LV Size (Mbytes) 300
Current LE 75
Allocated PE 75
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c1t2d0
PV Status available
Total PE 2169
Free PE 62
Autoswitch On
Jeffrey F. Goldsmith
Super Advisor

Re: Mirror OS

I also did an ioscan to get the path needed for step #6. Is this the correct way to do this step?

setboot -a 0/0/1/1.2.0


root: /home ==> ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 0/0/1/1.2.0 sdisk CLAIMED DEVICE IBM DMVS09D
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 1 0/0/2/0.2.0 sdisk CLAIMED DEVICE IBM DMVS09D
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
Nguyen Anh Tien
Honored Contributor

Re: Mirror OS

Jeffrey F. Goldsmith
If you set it Correctly. It look like:
===========================================
[trn0:/] lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c2t0d0 (0/0/2/0.0.0) -- Boot Disk
/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c2t0d0
/dev/dsk/c1t2d0
Root: lvol3 on: /dev/dsk/c2t0d0
/dev/dsk/c1t2d0
Swap: lvol2 on: /dev/dsk/c2t0d0
/dev/dsk/c1t2d0
Dump: lvol2 on: /dev/dsk/c2t0d0, 0
============================================
If it doesn't, do as Pete Randall saying
and type 3 commands more
#lvlnboot -r lvol1 /dev/vg00
#lvlnboot -s lvol2 /dev/vg00
#lvlnboot -b lvol1 /dev/vg00
HP is simple