Operating System - HP-UX
1849029 Members
5251 Online
104041 Solutions
New Discussion

Root Mirroring Fundas..!!!

 
SOLVED
Go to solution
Ranjith_5
Honored Contributor

Root Mirroring Fundas..!!!

Hi experts,

I understand the order of root mirror is

boot, swap and root. I also understand the change in the order of mirring will cause the system to crash/not booting. But why?? What is the theory behind this..


Regards,
Syam
13 REPLIES 13
RAC_1
Honored Contributor

Re: Root Mirroring Fundas..!!!

that is the way HP has defined it for hp-ux

Because the the lvols - /stand, swap and root has to be contegeous and in that order.

It is how it is on primary disk, when you mirror, it has to be same.
There is no substitute to HARDWORK
Geoff Wild
Honored Contributor

Re: Root Mirroring Fundas..!!!

That is the way....

In future:

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 -lq (;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

If both disks don't display "Boot Disk" - then they won't....go back and redo...


vgdisplay -v vg00

Then lvextend for all other lvols...



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.
Bill Hassell
Honored Contributor
Solution

Re: Root Mirroring Fundas..!!!

If you mean that mirroring the first 3 volumes to another disk must be done in order, it is because /stand (where the kernel is located) must be first or the processor will be unable to locate the volume. Primary swap must be second since the kernel needs this before processes are started. The root disk might be located in a physically different location but a lot depends on the vesion of HP-UX and whether you are using using LVM and/or VxVM for volume management.

Bottom line is that your boot disk, whether primary or mirror copy must be in this order. Is there some question about another arrangement? You certainly would fail to boot from the mirror if if was on the same disk.


Bill Hassell, sysadmin
John Dvorchak
Honored Contributor

Re: Root Mirroring Fundas..!!!

the boot is on a native hfs file system and that is what the boot loader understands. When the boot loader looks for the kernel it has to find it in /stand which is native hfs once the kernel is loaded, with it's drivers and loadable modules, one of them being vxfs, then it will understand how to deal with the other file systems namely, / (root) where the rest of the OS is located. Stuff like /sbin and root's home directory. Of course swap has to be loaded separately, so the kernel and boot loader can swap if needed before the OS comes up fully and mounts the other file systems.

Why they have to be one two and three on the physical disk is that is where the boot expects and looks for them in order.
If it has wheels or a skirt, you can't afford it.
Ranjith_5
Honored Contributor

Re: Root Mirroring Fundas..!!!

Hi,

Can you explain more? Dont you think this is a good question :-).

Thanks Bill and John for their expert answers. I will assign full points to you both..but let me wait for some more replies...else people will think the thread is closed.

Bill and John there is small difference between your reasonings for why the order boot swap and root is maintained during root mirror..any comments.

Regards,
Syam
Ranjith_5
Honored Contributor

Re: Root Mirroring Fundas..!!!

Hi All,

More Inputs pls..i am waiting to assign points to the remaining experts.

Regards,
Syam
Bill Hassell
Honored Contributor

Re: Root Mirroring Fundas..!!!

Actually, it's fairly simple. If you do not use the pvcreate -B option for the mirror disk, the mirror will not boot. If you put anything at the beginning of the mirror besides /stand and swap, the system will not boot. Try it.


Bill Hassell, sysadmin
Ranjith_5
Honored Contributor

Re: Root Mirroring Fundas..!!!

Bill,

You mean to say the data will be read only in the order of mirror..is it acting like a sequential device?

Regards,
Syam
Devender Khatana
Honored Contributor

Re: Root Mirroring Fundas..!!!

Hi,

Yes atleast for the first three file systems it will act like sequential device. LVOL4 onwards you can play with the file system utilizations. (LVOL4 can be /opt or /var or /home).

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

Re: Root Mirroring Fundas..!!!

Devender,

Is there any document which says these fundas? Can you mention any links?

Regards,
Syam
Sudeesh
Respected Contributor

Re: Root Mirroring Fundas..!!!

Syam,
This is due to the limitation with ISL and hpux boot loader, wher eit can load the kernel only from the initial part of the disk. If I come through some docs, will let you know.


Sudeesh
The most predictable thing in life is its unpredictability
Bill Hassell
Honored Contributor

Re: Root Mirroring Fundas..!!!

There are lots of documents on the details about LVM. This isn't something special with mirroring. It is a requirement (like every other operating system) that something be present at the first sector on the disk in order for the boot ROMs to read and locate the OS file. For HP-UX, the BDRA contains information about the boot area including the LIF directory where the initial boot loader is located. You create this area when you type the command mkboot.

Also at the beginning of the disk is the VGRA which defines the volume group and lvols on this disk. Historically, HP 9000 computers have had boot ROMs that can only read the HFS filesystem and know nothing about LVM, so in order to boot, the first lvol must contaion /stand. If it does not, the boot ROMs give up and report an error. You can't change this as it is hardcoded into the processor ROMs. Nor would you ever want to. Trying to customize a way to bootup in the middle of the disk is a recipe for sysadmin nightmares.

Get a copy of the Disk and File Management Tasks on HP-UX by Tom Madell. Otherwise, go to the ITRC (itrc.hp.com) and look through the knowledge base. If you don't haev a software support contract with HP, you'll only see a small portion of the available documents. The other resource is docs.hp.com where you can look at http://docs.hp.com/en/5990-8172/ch06s01.html which describes LVM as a disk management tool.


Bill Hassell, sysadmin
Ranjith_5
Honored Contributor

Re: Root Mirroring Fundas..!!!

Bill,

I am fully satisified with the answer. I think I dont need any more documents on this ..your reply was really great. Thanks a lot..

Regards,
Syam