1846441 Members
3076 Online
110256 Solutions
New Discussion

Mirroring

 
Prathamesh_1
Occasional Contributor

Mirroring

How would you check whether disk mirroring is dine in the server?is there any command to check original and mirrored disk
6 REPLIES 6
Ivan Ferreira
Honored Contributor

Re: Mirroring

You can use lvdisplay, for example:

/sbin/lvdisplay -v /dev/vg00/lvol1

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

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t1d0s2 38 38

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c2t1d0s2 00000 current

There you can see the value "mirror copies".
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Jeff_Traigle
Honored Contributor

Re: Mirroring

You don't mirror disks in HP-UX. You mirror logical volumes. To see if a logical volume is mirrored, run "lvdisplay /dev/vgXX/lvolY". There is a line labeled "Mirror copies" that shows the number of mirrors for the LV. 0 means it's not mirrored. Using the -v option on that lvdisplay command shows the device files used and the extent layout.
--
Jeff Traigle
DCE
Honored Contributor

Re: Mirroring


vgdisplay -v will show if the mirrors are sync'd

lvdisplay -v will show mirroring info on a disk/extent level detail

swlist -l product | grep -i mirror will show if the mirroring software is installed
Rick Garland
Honored Contributor

Re: Mirroring

lvdisplay -v /dev/vgX/lvY
There will be an entry in there to tell you how many mirror copies there are

Also, the resulting output will display multiple disks and the Logical Extents. These will match up.

Andrey Tumanov
Frequent Advisor

Re: Mirroring

To automate the process of finding if there are mirrored lvols you can use:

for var in `ls /dev/vg00/lvol*`
do
lvdisplay $var | grep -i mirror
done

This will list all the "Mirror Copies" for the lvols in VG00. If there will be any 1 or 2, it means they are mirrored.
Jaime Bolanos Rojas.
Honored Contributor

Re: Mirroring

Prathamesh,

bottom line, with the above commands you check that you have mirrored configure on the lvols.
But to check if they are fine, basically you do some testing on them.
For experience, if the disk drive that the lvol is in is fine, then the mirror should be fine.
If you really want to test, do a backup, and simulated a faulty drive, if you still can read your data, it means the mirror was working just fine.
But then again, not good to do in a production machine, and once is configure if there is not physical problems with the drive the mirror is usually ok.

Regards,

Jaime.
Work hard when the need comes out.