Operating System - HP-UX
1836362 Members
2853 Online
110100 Solutions
New Discussion

Re: mirroring only the reqd. volumes

 
SOLVED
Go to solution
T G Manikandan
Honored Contributor

mirroring only the reqd. volumes

Hello,
I have a vg00 with two disks of 40GB capacity.
I have extra one disk free which is 20GB.
I am planning to mirror only the reqd. logical volumes like /var /opt / swap /usr /tmp which should be around 5GB.
Is that possible only to mirror only the reqd. logical volumes from the boot disk to create a mirror disk and boot from that mirrored disk? This should be possible right?!
or
all the logical volumes should be mirrored to create the boot disk?
Your response please.
3 REPLIES 3
Santosh Nair_1
Honored Contributor
Solution

Re: mirroring only the reqd. volumes

Since mirroring happens at the LVM level, you should be able to mirror only selected LVs as you described.

If you're planning to boot off this second disk, remember to do a pvcreate -B on the disk, this will set aside a LIF area. and then do a mkboot on this disk to create the LIF area. Finally, I believe /stand has to be the first LV on the disk...basically:

1. pvcreate -B /dev/rdsk/

2. vgextend /dev/vg00 /dev/dsk/

3. mkboot /dev/dsk/

4. mkboot -a "hpux -lq" /dev/rdsk/

5. lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/

assuming lvol1 is /stand. Repeat step 5 for any additional logical volumnes that need to be mirrored.

6. lvlnboot -R

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Animesh Chakraborty
Honored Contributor

Re: mirroring only the reqd. volumes

Hi,
I have lot of lvs on vg00 but mirrored only requied ones like / ,/stand./var, /opt etc. etc.
Should not be any problem if you mirror the root volume properly.

Animesh
Did you take a backup?
David_546
Occasional Advisor

Re: mirroring only the reqd. volumes

Hello,

Although you don??t need to mirror all the vg00 lvols you must at least mirror these three lvols: lvol1 (/stand), lvol2 (swap/dump) and lvol3 (/ - root).

Be aware of differences between mirror a boot disk and the rest. You can do it as it shows below:

1- Select the disk that will contain the mirrored copy. For instance, /dev/dsk/c1t0d0.

2- pvcreate -B /dev/rdsk/c1t0d0
3- mkboot /dev/rdsk/c1t0d0
4- mkboot -a "hpux -lq" /dev/rdsk/c1t0d0
(do the same for the source root disk)

5- vgextend /dev/vg00 /dev/dsk/c1t0d0
6- lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t0d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t0d0
(It??s important to mantain this order)
7- Run:
lvlnboot -r /dev/vg00/lvol3
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v: check that there aren??t errors

8- Startup in mantained mode: ISL> hpux -lq and do:
vgchange -a y vg00
mount -a
lvchange -M n -c n /dev/vg00/lvol2
9- Reboot the system, delete or move /etc/mnttab file and run "mount -a".


With this kind of mirror in case that you have to startup from it you would not have these file system /usr /var /tmp and the correspond commands, files and so on.

Hope this help!