1825002 Members
2631 Online
109678 Solutions
New Discussion юеВ

REgarding mirring

 
nandam
Frequent Advisor

REgarding mirring

Hi

Could you please tell me how to check system is on mirring or not
10 REPLIES 10
spex
Honored Contributor

Re: REgarding mirring

Hi,

# lvdisplay -v /dev/vgxx/lvoly | more

If "Mirror copies" > 1, the LV is mirrored.

PCS
James R. Ferguson
Acclaimed Contributor

Re: REgarding mirring

Hi Nandam:

If you are referring to LVM mirroring, that's done at the logical volume level.

A 'lvdisplay' (e.g. 'lvdisplay /dev/vg00/lvol1') will list "Mirror copies". A value of one or two indicates that that logical volume is mirrored. Adding the '-v' switch to the command will show you on which physical volumes the mirrors reside and whether or not they are synchronized or not.

Regards!

...JRF...
spex
Honored Contributor

Re: REgarding mirring

That should be, if "Mirror copies" > 0...

PCS
Patrick Wallek
Honored Contributor

Re: REgarding mirring

The first thing is to check and see if you have the MirrorDisk/UX software installed.

# swlist -l bundle |grep -i mirror
B2491BA B.11.11 MirrorDisk/UX


Then check all of your LV's and see what the mirror copy is set to.

# lvdisplay /dev/vg00/lvol1 | grep -i mirror
Mirror Copies 1

If the "mirror copies" line comes back as 0, then it is not mirrored. If it is 1 or 2, then it is mirrored.

You must remember that mirroring is done at the logical volume level and NOT at the disk or VG level.
Jaime Bolanos Rojas.
Honored Contributor

Re: REgarding mirring

Nandam

lvdisplay -v on the logical volume and then you piped that to more it will show you something like this
lvdisplay -v /dev/vg00/lvol3
--- Logical volumes ---
LV Name /dev/vg00/lvol3
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1536
Current LE 192
Allocated PE 192
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

Where is says mirrored copies, it should say 1, in this case it says 0 which means is not mirrored.

Remember that in hp-ux you mirror logical volumes and not disks, that's why the lvdisplay command.

Regards,

Jaime.
Work hard when the need comes out.
Pupil_1
Trusted Contributor

Re: REgarding mirring

if you are asking about the root disk then the command can also be
lvlnboot -v

If you see more than PV, then the root disk is mirrored.

This does not work for any other VG!
There is always something new to learn everyday !!
Steven E. Protter
Exalted Contributor

Re: REgarding mirring

Shalom,

The key fact besides the presence of Mirror/ux is you will see two copies or more in your lvdisplay -v output.

lvlnboot -V

That will tell you if you have mirrored the boot disk.

Mirror procedure, in case you find you are not mirrored and wish to proceed.


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

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
Fabian Brise├▒o
Esteemed Contributor

Re: REgarding mirring

you could also check the easy way via SAM
disk and filesystems->logical volumes

and there you should see if a mirror exist
Knowledge is power.
Sajjad Shafi
Advisor

Re: REgarding mirring

That is how i check my miriroing is upto date or not

LC=`/etc/lvdisplay -v /dev/vg0?/lvol* |grep -c stale`
if [ $LC -gt 0 ]; then
echo ""
echo "Disk Mirroring is Broken"
else
echo ""
echo "Disk Mirroring is Ok"
fi
Sp4admin
Trusted Contributor

Re: REgarding mirring

Hi nandam,

Look like Steven answerd your question.

You can do alvdisplay on a logical volume and it should show if it mirrored.

#lvdisplay /dev/vg00/lvol1
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 184
Current LE 46
Allocated PE 92
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default


sp,