Operating System - HP-UX
1849134 Members
4171 Online
104041 Solutions
New Discussion

Re: mirroring internal disks to array disk

 
SOLVED
Go to solution
Edgar_8
Regular Advisor

mirroring internal disks to array disk

Hi,

We have an L-class with 2x 9 Gb internal disks with vg00 spanning both internal disks. The only bootable disk though is
internal disk1. An array of 6x20 Gb has been connected to the server. What would the procedure be to mirror the
2 internal disks onto the array? Would the below work:

# pvcreate -f -B /dev/rdsk/array_disk1
# mkboot /dev/rdsk/array_disk1
# vgextend /dev/vg00 /dev/dsk/array_disk1
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/array_disk1
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/array_disk1
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/array_disk1
# mkboot -a "hpux (0/0/2/1.6.0;0)/stand/vmunix" /dev/rdsk/array_disk1
# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/array_disk1

Please advise!

Thanks
9 REPLIES 9
Kent Ostby
Honored Contributor

Re: mirroring internal disks to array disk

Edgar --

That looks good to me.

One thing I would add would be to check the lvlnboot information after you are done with:

lvlnboot -v /dev/vg00

to ensure that it shows that both disks are bootable .

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Steven E. Protter
Exalted Contributor

Re: mirroring internal disks to array disk

vgextend ....

lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/array_disk1

I've used this method to move stuff off local disk onto array disks without downing production.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Marco Santerre
Honored Contributor

Re: mirroring internal disks to array disk

Edgar,

Yes you can mirror external drives just like the procedures you posted. I would however put "hpux -lq" just in case, cause if you do lose your internal drives (hardly ever happens that you would lose more than one at a time but you never know), you'd want to boot even without quorum.

I would also verify that my lvlnboot information is updated accordingly.
Cooperation is doing with a smile what you have to do anyhow.
Pramod_4
Trusted Contributor

Re: mirroring internal disks to array disk

I would say change the sequence of the last two command's.

mkboot -b first then mkboot -a.

Thanks,
Pramod
Geoff Wild
Honored Contributor
Solution

Re: mirroring internal disks to array disk

Here's a procedure I wrote:

How to mirror the root disk
Say /dev/dsk/c0t6d0 is the root disk and /dev/dsk/c3t6d0 is the disk you want to make a mirror of.

1. Create a bootable LVM disk to be used for the mirror.
pvcreate -B /dev/rdsk/c3t6d0
2. Add this disk to the current root volume group.
vgextend /dev/vg00 /dev/dsk/c3t6d0
3. Make the new disk a boot disk.
mkboot -l /dev/rdsk/c3t6d0
4. Copy the correct AUTO file into the new LIF area.
mkboot -a "hpux -l q (;0)/vmunix" /dev/rdsk/c3t6d0
5. Mirror the boot, root and primary swap logical volumes to the new
bootable disk. Ensure that all devices in vg00, such as /usr, /swap,
etc., are mirrored.
The following is an example of mirroring the boot logical volume:
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
The following is an example of mirroring the primary swap logical
volume:
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
The following is an example of mirroring the root logical volume:
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0
6. Update the boot information contained in the BDRA for the mirror
copies of boot, primary swap and root.
/usr/sbin/lvlnboot -b /dev/vg00/lvol1
/usr/sbin/lvlnboot -s /dev/vg00/lvol2
/usr/sbin/lvlnboot -r /dev/vg00/lvol3
7. Check if the BDRA is correct.
/usr/sbin/lvlnboot -R /dev/vg00
8. Verify that the mirrors were properly created.
lvlnboot -v /dev/vg00
The output of this command is shown in a display like the following:
Boot Definitions for Volume Group /dev/vg00:
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

vgdisplay -v vg00

Then lvextend for all other lvols:

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c3t6d0


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Edgar_8
Regular Advisor

Re: mirroring internal disks to array disk

Hi,

Thanks for the info.I just have a last concern, as I said the 2 internal disks are part of vg00 but only 1 of the disks is bootable. Now when I mirror will the 2nd internal disk be automatically mirrored?

Thanks!
Elmar P. Kolkman
Honored Contributor

Re: mirroring internal disks to array disk

Yes, your second disk will also be mirrored as long as you mirror all logical volumes, and not only the ones on the first internal disk. Since you have enough diskspace on the external disk, this is A Good Thing (TM).
Every problem has at least one solution. Only some solutions are harder to find.
Edgar_8
Regular Advisor

Re: mirroring internal disks to array disk

Hi,

Hi,

Thanks for info. I'm still a bit concerned about my mirror set-up.
Current set-up: vg00 comprises 2 internal disks 9Gb each.
planned Mirror set-up: lvextend vg00 onto 1 array disk 20 Gb? But the array disk will only use 9 Gb,
so does that mean that I would have to use a 2nd array disk for the 2nd internal disk? If so would
I have to make the 2nd array disk bootable as well?
In addition do I have to set-up a lvmpvg file & change the allocation policy to PVG-strict? And if so why?
What if I want to set-up the alternate boot path to be the array mirror disk, can the path be multiple disks?

Please advise.

Thanks in advance!
Elmar P. Kolkman
Honored Contributor

Re: mirroring internal disks to array disk

Ah, yes. I forgot the max PE per PV parameter.

If possible, try to let the disk array export 2 9 Gb disks and add those instead of 1 20 Gb which is only used up to 9 Gb, because it will be impossible to mirror 18 Gb on 1 9Gb physical volume (even though it is really a 20 Gb disk).

If the diskarray doesn't have this capability, you could always go for ignite and create the vg00 with the diskarray disk in the volumegroup, which will result in a new vg00 with a large enough PE per PV setting.
Every problem has at least one solution. Only some solutions are harder to find.