Operating System - HP-UX
1833877 Members
2217 Online
110063 Solutions
New Discussion

How to check dik mirroring ?

 
SOLVED
Go to solution
depriester frank
Occasional Contributor

How to check dik mirroring ?

I would like to know the set of UNIX commands to check whether disks are correctly mirrored or not. (lvdisplay -v ? vgdisplay ? ...)

Could somebody help me please ?
fdepri
5 REPLIES 5
Vicente Sanchez_3
Respected Contributor
Solution

Re: How to check dik mirroring ?

Hi,

It depends, with Mirror/UX, software mirroring, you have:

vgdisplay -v shows the status of the volume group. That is, the number of disk it has, the distinct lvols are created, etc.

lvdisplay shows the status of the lvol. One of this is the mirror copies. If it has 0 that means this lvol is not mirrored.

With Mirror/UX you don't mirror disks, your mirror lvols.

Other kind of disks are array disks. This disks create hardware mirror, so vgdisplay or lvdisplay doesn't show you the real situation. You need other tools to access to the configuration.

Regards, Vicente.
MANOJ SRIVASTAVA
Honored Contributor

Re: How to check dik mirroring ?

Hi


do a lvdisplay -v /dev/vg00/lvol1 this will give u the o/p as :

--- 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) 84
Current LE 21
Allocated PE 42
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/c1t6d0 21 21
/dev/dsk/c2t6d0 21 21

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c1t6d0 00000 current /dev/dsk/c2t6d0 00000 current
00001 /dev/dsk/c1t6d0 00001 current /dev/dsk/c2t6d0 00001 current
00002 /dev/dsk/c1t6d0 00002 current /dev/dsk/c2t6d0 00002 current
00003 /dev/dsk/c1t6d0 00003 current /dev/dsk/c2t6d0 00003 current
00004 /dev/dsk/c1t6d0 00004 current /dev/dsk/c2t6d0 00004 current
00005 /dev/dsk/c1t6d0 00005 current /dev/dsk/c2t6d0 00005 current
00006 /dev/dsk/c1t6d0 00006 current /dev/dsk/c2t6d0 00006 current
00007 /dev/dsk/c1t6d0 00007 current /dev/dsk/c2t6d0 00007 current
00008 /dev/dsk/c1t6d0 00008 current /dev/dsk/c2t6d0 00008 current
00009 /dev/dsk/c1t6d0 00009 current /dev/dsk/c2t6d0 00009 current
00010 /dev/dsk/c1t6d0 00010 current /dev/dsk/c2t6d0 00010 current
00011 /dev/dsk/c1t6d0 00011 current /dev/dsk/c2t6d0 00011 current
00012 /dev/dsk/c1t6d0 00012 current /dev/dsk/c2t6d0 00012 current
00013 /dev/dsk/c1t6d0 00013 current /dev/dsk/c2t6d0 00013 current
00014 /dev/dsk/c1t6d0 00014 current /dev/dsk/c2t6d0 00014 current
00015 /dev/dsk/c1t6d0 00015 current /dev/dsk/c2t6d0 00015 current
00016 /dev/dsk/c1t6d0 00016 current /dev/dsk/c2t6d0 00016 current
00017 /dev/dsk/c1t6d0 00017 current /dev/dsk/c2t6d0 00017 current
00018 /dev/dsk/c1t6d0 00018 current /dev/dsk/c2t6d0 00018 current
00019 /dev/dsk/c1t6d0 00019 current /dev/dsk/c2t6d0 00019 current
00020 /dev/dsk/c1t6d0 00020 current /dev/dsk/c2t6d0 00020 current


you can jsut grep on Mirror copies and see what is the argument if 1 then it is mirroed if 0 then not mirrored .


Manoj Srivastava



James R. Ferguson
Acclaimed Contributor

Re: How to check dik mirroring ?

Hi:

Since HP-UX MirrorDisk is implemented at the logical volume level, an appropriate way to verify it is with 'lvdisplay'. 'lvdisplay' will report a non-zero value for "Mirror copies" if a logical volume is in fact mirrored. Adding the verbose flag ('-v') will show the mapping of each logical disk extent and the physical volume on which it exists. The state ("current" or "stale" is also exposed with the verbose option.

Regards!

...JRF...
Helen French
Honored Contributor

Re: How to check dik mirroring ?

# lvdisplay -v lvol_name

This will be the best bet for you. However this document explains little more (TKB #LVMKBRC00005096):

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065011429
Life is a promise, fulfill it!
Oliver Zell_1
Advisor

Re: How to check dik mirroring ?

# Identifies and displays stale extends on all system volume groups.
# Useful to determine defect harddisks in mirrored enviroments
#


vgdisplay -v | awk '/LV Name/ { print $3 }' |\ xargs lvdisplay -v | grep -i -e "lv name" -e "lv status" -e stale -e '?'

This command displays stale and!!! ??? extends for all lvols.
Maybe thats helpful for you

Regards Andreas