1835207 Members
2681 Online
110077 Solutions
New Discussion

Mirroring 101

 
SOLVED
Go to solution
Bill Brutzman
Frequent Advisor

Mirroring 101

Itanium 11i v2

I did a search on mirroring but I have some questions on procedures found.

I have two 36 GB internal drives. A starting point would be appreiciated.
10 REPLIES 10
Rita C Workman
Honored Contributor

Re: Mirroring 101

You don't have any questions listed....but maybe this will help.

You mirror disks, by mirroring the logical volumes. So after you create a logical volume on one disk you mirror by:

lvextend -m 1 /dev/vgname/lvolname /dev/dsk/

the -m = mirror
the 1 = one mirror copy

Hope that starts you off...

Rgrds,
Rita
Tim Nelson
Honored Contributor

Re: Mirroring 101

Here is the 411 on the Mirroring 101.

http://www11.itrc.hp.com/service/cki/docDisplay.do?docId=emr_na-c00865281-1&docLocale=en&admit=109447626+1210622151225+28353475


If not root disk.
http://docs.hp.com/en/B2355-90950/B2355-90950.pdf appendix A

pvcreate new disk for mirror
pvcreate /dev/rdsk/cxtxdx

add to vgxx
vgextend /dev/vgxx /dev/dsk/cxtxdx

mirror lvols in vgxx
lvextend -m 1 /dev/vgxx/lvolx
(if multiple choices for devices then specify which one you wish the mirror to extend to )
lvextend -m 1 /dev/vgxx/lvolx /dev/dsk/cxtxdx

Bill Brutzman
Frequent Advisor

Re: Mirroring 101

Rita:

Thanks for writing.

I have eleven logical volumes on the first (root) disk. Do I need to create these eleven on the new disk to be mirrored or does that command handle that automatically?

Please advise.

Regards,

--Bill
James R. Ferguson
Acclaimed Contributor

Re: Mirroring 101

Hi Bill:

> I have eleven logical volumes on the first (root) disk. Do I need to create these eleven on the new disk to be mirrored or does that command handle that automatically?

Mirroring under LVM (which is what I assume we are talking about) is done at the *logical* *volume* level.

That said, if you are mirroring the root disk (vg00) you must mirror at least the first three logical volumes *in order*, where 1=/stand; 2=primary swap; 3=/.

You don't say if you are running PA-RISC or Itanium servers. The procedure for mirror setup of the boot disk differs slightly. I suggest looking at appendix-A of this document:

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: Mirroring 101

Shalom,

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

Minor variances for Itanium, nothing huge.

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
Bill Brutzman
Frequent Advisor

Re: Mirroring 101

I am struggling with errors...

# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/...
Usage: lvextend
[-A Autobackup]
{-l LogicalExtentsNumber |
-L LogicalVolumeSize}
LogicalVolumePath [ PhysicalVolumePath... | PhysicalVolumeGroupName... ]
"m": Illegal option.

# lvextend -A y -L 304 /dev/vg00/...
lvextend: "LogicalExtentsNumber" is not bigger than current setting.

Further help would be appreciated.
Patrick Wallek
Honored Contributor
Solution

Re: Mirroring 101

It appears that you do not have the MirrorDisk/UX product installed on your server.

# swlist -l product |grep -i mirror

If you have HP-UX 11i V2 Foundation Operating Environment (FOE), then MirrorDisk is a product you must purchase.

If you have HP-UX 11i V2 Enterprise Operating Environment (EOE) or Mission Critical Operating Environment (MCOE) then MirrorDisk is included.

As to your 2nd lvextend error, the '-L' indicates the number of MB that you want your LV to be. When using 'lvextend -L' you must specify the TOTAL SIZE IN MB of your LV.
Asif Sharif
Honored Contributor

Re: Mirroring 101

Hi Bill,

Please find the attached script for mirroring.

Regards,
Asif Sharif
Regards,
Asif Sharif
Asif Sharif
Honored Contributor

Re: Mirroring 101

Hi Bill,

Please find the attached script for mirroring.

Regards,
Asif Sharif
Regards,
Asif Sharif
Bill Brutzman
Frequent Advisor

Re: Mirroring 101

It appears that we are required to purchase a product to make mirroring work. I sent an RFQ to our ReSeller.