1833779 Members
2334 Online
110063 Solutions
New Discussion

Re: Disk mirroring

 
Aftab Sadiq
Advisor

Disk mirroring

We have got HP9000 (N4000) Server running HP-UX(11.0) 64-bit with two internal hard disks.
First hard disk is bootable disk which has OS and oracle installed. 2nd hard disk is unused and I want to make it mirror of first disk.
Here are steps that I am going to do.

1. pvcreate -B /dev/rdsk/c2t6d0
2. vgextend /dev/vg00 /dev/dsk/c2t6d0
3. mkboot /dev/dsk/c2t6d0
4. mkboot -a "hpux -lq" /dev/rdsk/c2t6d0
5. lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t6d0
6. lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t6d0
7. lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t6d0
8. lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t6d0
9. lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t6d0
10. lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t6d0
11. lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t6d0
12. lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t6d0
13. lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c2t6d0
14. lvlnboot -R

c2t6d0 is 2nd disk.

Please correct me if you find anything missing or wrong

Thanks

Aftab
6 REPLIES 6
Eileen Millen
Trusted Contributor

Re: Disk mirroring

Looks good.
Your number 2. step was fourth on my list.
I don't know if that matters.

lvlnboot -v will show that both disk are being used.#
lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c2t6d0 (10/0.6.0) -- Boot Disk
/dev/dsk/c2t5d0 (10/0.5.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c2t6d0
/dev/dsk/c2t5d0
Root: lvol3 on: /dev/dsk/c2t6d0
/dev/dsk/c2t5d0
Swap: lvol2 on: /dev/dsk/c2t6d0
/dev/dsk/c2t5d0
Dump: lvol2 on: /dev/dsk/c2t6d0, 0


Eileen Millen
Trusted Contributor

Re: Disk mirroring

Sorry, number 3. should be /dev/rdsk
Rainer_1
Honored Contributor

Re: Disk mirroring

just an addition for step 3.
if you have installed Diagnostics then you could add the offline diags to the second disk

mkboot -b /usr/sbin/diag/lif/updatediaglif -l /dev/rdsk/c2t6d0
Insu Kim
Honored Contributor

Re: Disk mirroring

This is what i'm doing.

1. pvcreate -B /dev/rdsk/c2t6d0
2. vgextend /dev/vg00 /dev/dsk/c2t6d0
3. mkboot /dev/rdsk/c2t6d0
4. mkboot -a "hpux -lq" /dev/rdsk/c2t6d0
5. lvextend -m 1 /dev/vg00/lvol1
6. lvextend -m 1 /dev/vg00/lvol2
7. lvextend -m 1 /dev/vg00/lvol3
8. lvextend -m 1 /dev/vg00/lvol4
9. lvextend -m 1 /dev/vg00/lvol5
10. lvextend -m 1 /dev/vg00/lvol6
11. lvextend -m 1 /dev/vg00/lvol7
12. lvextend -m 1 /dev/vg00/lvol8
13. lvextend -m 1 /dev/vg00/lvol9
14. cd /usr/sbin/diag/lif
15. mkboot -b updatediaglif -p ISL -p AUTO -p HPUX -p LABEL /dev/rdsk/c2t6d0
( This is to create a lif with all utilities on alternate boot disk. )
15. lvlnboot -R
Never say "no" first.
David Hixson
Advisor

Re: Disk mirroring

Eileen is right that you need to make sure that lvlnboot displays all of the correct pointers to boot, root, and swap. The man pages are pretty good if you need to make any changes.

Another thing to check is that you probably want to mirror the volumes in the order in which they where created. The order the list on a vgdisplay should be accurate. If you have expanded any of them since you first built the system you may see a slight performance improvement if you mirror to this new disk, remove the primary, and then mirror back so everything is contiguous.

Finaly, you can use 'lifls -lv /dev/dsk/whatever' to check the lif information on each disk and make sure they are the same'.
LVM is a powerful tool in the hands of the devious.
Brad Anderson
New Member

Re: Disk mirroring

Don't forget to run setboot -a and specify your alternate boot path.