1833016 Members
3399 Online
110048 Solutions
New Discussion

mirror

 
SOLVED
Go to solution
Sunil_47
Occasional Advisor

mirror

Hello all,

I have a basic question about mirroring. Is mirroring a disk possible through SAM. Also, could someone tell how much time would it take to mirror a 18 gb disk ? I can give more detail if you need. Thanks in advance.
9 REPLIES 9
RAC_1
Honored Contributor
Solution

Re: mirror

Never did it through SAM. following is the procedure that I follow.

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.
There is no substitute to HARDWORK
Geoff Wild
Honored Contributor

Re: mirror

As far as time, anywhere from 5 to 30 minutes...

If not a boot disk, then mirroring is simply using the lvextend command:

lvextend -m 1 /dev/vg10/lvol1 /dev/dsk/c3t6d0

man lvextend for more info


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.
Stephen Keane
Honored Contributor

Re: mirror

sunil,

first you need to purchase the mirroring software/licence it doesn't come as standard on HP (for reasons best known to HP).

e.g. for HP-UX 11.0/11.11/11iv2 you would need

B2491BA Mirrordisk/UX

which is around $1000
Steven E. Protter
Exalted Contributor

Re: mirror

My predecessor at my last job, did use SAM to do mirroring. The problem was he had to be careful that there was free space on only one disk when he mirrored logical volumes, otherwise there was no control of what disk the mirror copy went to.

There were still a few steps, noted well above that had to be done manually.

When I took over the shop, I took the time to use the steps above, which allowed me to personally choose which disk the mirror copy went on.

The manual procedure above is the way to go. Mirror/ux is a must, though you can mirror the rootvg with vxvm without additional licensing.

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
Gerardo Mora
Advisor

Re: mirror

Mirror can be made on logical volume level not disk level, that mean if you want to mirror a complete disk then you have to mirror all logical volumes on that disk. You can do it using SAM but only when you create the logical volume. The time to mirror the complete disk depend of several factors, but consider between 15 to 30 min.
share to learn
Sunil_47
Occasional Advisor

Re: mirror

Thanks for all replies ... This system boots from a flash card ... And I am not sure if the root disk should be bootable ... Although I know this boots from a flashcard, I still want to check if the current root disk is bootable. How can I check that? If I find this root disk is not necessary to be bootable, can I just use

lvextend -m 1 /dev/vg10/lvol1 /dev/dsk/c1t0d0

to create the mirror. vg00 has lvol1 to lvol10. In that case, should I do lvextend 10 times?

lvextend -m 1 /dev/vg10/lvol2 /dev/dsk/c1t0d0
lvextend -m 1 /dev/vg10/lvol3 /dev/dsk/c1t0d0
...
lvextend -m /dev/vg10/lvol10 /dev/dsk/c1t0d0

Thanks in advance.
Sudeesh
Respected Contributor

Re: mirror

Hi Sunil.

Use lvlnboot -v to check which disk is bootable.

Yes, you need to lvextend each lvol from 1 to 10. Otherwise use a script like this...

#for i in 1 2 3 4 5 6 7 8 9 10
do
lvextend -m 1 /dev/vg00/lvol$i /dev/rdsk/c0t3d0
done

I assume you understand /dev/rdsk/c0t3d0 is the new disk added where you want to create mirror.

Hope this helps you.

Sudeesh
The most predictable thing in life is its unpredictability
Suraj Singh_1
Trusted Contributor

Re: mirror

Hi Sunil,

To find out whether your current boot fisk is mirrored, use
# lvlnboot -v

If the o/p of this command shows more than one disk (/dev/dsk/c?t?d?), then the root disk is mirrored.

In case it is not mirrored, and you have MirrorUX license, then you can go ahead and mirror the root disk as per the procedure laid by RAC above.

To mirror disk, or rather LVs to be more precise, you just need to lvextend with -m option.

Regards
What we cannot speak about we must pass over in silence.
Sunil_47
Occasional Advisor

Re: mirror

Hi,

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t0d0 (14/0/0.0.0) -- Boot Disk
/dev/dsk/c1t0d0 (14/0/1.0.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t0d0
/dev/dsk/c1t0d0
Root: lvol3 on: /dev/dsk/c0t0d0
/dev/dsk/c1t0d0
Swap: lvol2 on: /dev/dsk/c0t0d0
/dev/dsk/c1t0d0
Dump: lvol2 on: /dev/dsk/c0t0d0, 0


Looks like the root disk is bootable disk. So, this is the procedure I will follow to mirror root disk (as explained by RAC earlier in this thread).

Just wanted to tell you that mirroring the root disk will be done after a cold installation. Please let me know if that is OK.


1) pvcreate -B /dev/rdsk/c1t0d0
2) vgextend /dev/vg00 /dev/dsk/c1t6d0 (slight change ... RAC said it is /dev/vg01)
3) mkboot /dev/dsk/c1t0d0

mkboot -a "hpux -lq" /dev/rdsk/c1t0d0

4) 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

Repeat the lvextend for all other logical volumes on the boot mirror. In my case, it is lvol1 ... lvol10.

5) 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.


Am I missing something? Please let me know.