1833198 Members
3107 Online
110051 Solutions
New Discussion

Re: mirroring

 
SOLVED
Go to solution
M. Tariq Ayub
Regular Advisor

mirroring

I want to mirror with lvm. The OS is HP-UX 11.0. It has two internal disk c3t5d0 and c3t6d0. OS is running from c3t6d0

I am writing the procedures please verify.

pvcreate -f -B /dev/rdsk/c3t5d0
vgextend /dev/vg00 /dev/dsk/c3t5d0

mkboot -l /dev/dsk/c3t5d0

mkboot -a “hpux” /dev/rdsk/c3t5d0

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t5d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t5d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t5d0

lvlnboot -r /dev/vg00/lvol3
lvlnboot -b /dev/vg00/lvol1
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2

setboot -a 8/16/5.6.0


lvlnboot -v


lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t5d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t5d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t5d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t5d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t5d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3
8 REPLIES 8
Senthil Kumar .A_1
Honored Contributor

Re: mirroring

Hi Tariq,

Your procedure looks good for me..

Please refer to the following URL..particularly last response from Geoff Wild ....

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=627341

Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Steven E. Protter
Exalted Contributor
Solution

Re: mirroring

36 of 254 Point assignment. Please improve.

Here is a copy of my guide on the subject:

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

36 of 254 Point assignment. Please improve.

Suggestion:
http://forums1.itrc.hp.com/service/forums/pageList.do?userId=CA879853&listType=unassigned&forumId=1

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
Cem Tugrul
Esteemed Contributor

Re: mirroring

Hi Tarig,
As an addition to replies,
XIII) How to create a mirrored boot disk

Note the following example is using the disk c1t6d0 as the
mirrored boot disk and c0t6d0 as the boot disk.

1) Initialize the disk and make it bootable
pvcreate -B /dev/rdsk/c1t6d0
Note: the -B parameter tell pvcreate that this will be a
bootable disk.
2) Add the physical volume to the volume group
vgextend /dev/vg01 /dev/dsk/c1t6d0
3) Use mkboot to place the boot utilities in the boot area and add
the AUTO file.
mkboot /dev/dsk/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
lvextend -m 1 /dev/vg00/lvol2
lvextend -m 1 /dev/vg00/lvol3
Note: LVM will resynchronize the new mirror copies. This step will
takes several minutes

Repeat the lvextend for all other logical volumes on the boot
mirror.
6) Modify your alternate boot path to point to the mirror copy of the
boot disk.
setboot -a 8/8.6.0 # Use the Hardware path for your new
boot disk.
Our greatest duty in this life is to help others. And please, if you can't
Suraj Singh_1
Trusted Contributor

Re: mirroring

Hi,

Before proceeding for actual mirroring, make sure that you hace Mirror/UX license.

# swlist|grep -i mirror

REgards
What we cannot speak about we must pass over in silence.
M. Tariq Ayub
Regular Advisor

Re: mirroring

setboot -a 8/8.6.0

Will it replace My existing boot disk or It will add the second disk in boot list. Ie after this command from where the OS will be boot. Primary or the new secondary?
Cem Tugrul
Esteemed Contributor

Re: mirroring

Hi,
will add the second disk to boot disks.
When you finish then run the command;
#lvlnboot -v
for to check your boot disks information...
For example from my ux-box;
newhr:/#lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk
/dev/dsk/c2t2d0 (0/0/2/0.2.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Root: lvol3 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Swap: lvol2 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Dump: lvol2 on: /dev/dsk/c1t2d0, 0

My boot disk was /dev/dsk/c1t2d0
and i have mirrored my second disk /dev/dsk/c2t2d0
above the steps...
On the other hand,With succesfully finished
mirroring you can easily decide booting from
which disks because they are mirrored...

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
KVK
Valued Contributor

Re: mirroring

It won't replace your primary boot disk path
You just entering the alternate boot path . In case of the system can't find a primary boot path it will go ahead to the alternate disk in system boot
Devender Khatana
Honored Contributor

Re: mirroring

Hi,

Apart from

#mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c3t5d0

I would suggest this for primary disk as well so that in absence of your alternate disk it is able to boot from primary.

#mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c3t6d0

And also check that it is set for both disks by

#lifcp /dev/rdsk/c3t5d0:AUTO -
#lifcp /dev/rdsk/c3t6d0:AUTO -

HTH,
Devender
Impossible itself mentions "I m possible"