Operating System - HP-UX
1822204 Members
3891 Online
109640 Solutions
New Discussion юеВ

How to tell if a disk is mirrored in HP-UX?

 
SOLVED
Go to solution
andrew sun_1
Occasional Advisor

How to tell if a disk is mirrored in HP-UX?

Does anyone know how to tell if a disk is mirrored in HP-UX?
9 REPLIES 9
Anil_41
New Member

Re: How to tell if a disk is mirrored in HP-UX?

Hi,

Please do the following.

lvdisplay -v /dev/vgXX/lvolX | more

(substitute XX with relevant data)

look for "Mirror Copies"

If its 0 then no mirror, if 1 then there is a mirror.

Hope this helps,
Anil
MarkSyder
Honored Contributor

Re: How to tell if a disk is mirrored in HP-UX?

You mirror individual logical volumes rather than discs.

SAM -> discs -> Logical Volumes - sixth column is number of mirror copies.

Mark Syder ~(like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Joseph Loo
Honored Contributor

Re: How to tell if a disk is mirrored in HP-UX?

hi,

if it is a mirror boot disk, use:

# lvlnboot -v
u should see 2 boot disk on different path

for non-boot disk (or even boot disk), check each logical volumes:

# lvdisplay -v /dev/vgXX/lvol## |grep Mirror
is it more than 0?

regards.
what you do not see does not mean you should not believe
Slawomir Gora
Honored Contributor

Re: How to tell if a disk is mirrored in HP-UX?

Hi,
there is no info about disk mirror but only about mirror of logical volumes.

Use lvdisplay command to check number of mirror copies for logical volume ( if > 0 - volume has mirror)

ex:
lvdisplay -v /dev/vg00/lvol1 | grep Mirror

You need to check this for all volumes.


Muthukumar_5
Honored Contributor

Re: How to tell if a disk is mirrored in HP-UX?

We can find whether disk is mirrored or not as,

# for fs in `bdf | awk '!/^Filesystem/ { print $1 }'`
do
lvdisplay -v $fs | grep -q 'mirror'
if [[ $? -eq 0 ]]
then
echo "$fs is mirrored"
fi
done

HTH.
Easy to suggest when don't know about the problem!
Adisuria Wangsadinata_1
Honored Contributor
Solution

Re: How to tell if a disk is mirrored in HP-UX?

Hi Andrew,

First, check whether you have a Mirror/UX software on your system or not :

# swlist -l fileset |grep MIRROR

Second, check with lvdisplay command on the particular lvol. The example below is to check the lvols on vg00 :

# lvdisplay -v /dev/vg00/lv*

--- Logical volumes ---
LV Name /dev/vg00/lvcrash
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 800
Current LE 25
Allocated PE 50
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t0d0 25 25
/dev/dsk/c2t1d0 25 25

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t0d0 00501 current /dev/dsk/c2t1d0 00541 current
00001 /dev/dsk/c2t0d0 00502 current /dev/dsk/c2t1d0 00542 current
00002 /dev/dsk/c2t0d0 00503 current /dev/dsk/c2t1d0 00543 current
00003 /dev/dsk/c2t0d0 00504 current /dev/dsk/c2t1d0 00544 current

From the example above, you can see the mirror copies is 1 and you can also get there's PE1 mirror to PE2 with current status.

The other way around is to check with lvlnboot command (only for boot disk / vg00) :

# lvlnboot -v

Hope this information can help.

Cheers,
AW
now working, next not working ... that's unix
Cem Tugrul
Esteemed Contributor

Re: How to tell if a disk is mirrored in HP-UX?

Hi Andrew,

According to your another Q before;
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=899011
i think you are trying to know what is on your system?
:-)
Anyway,there are generally 2 evidences to
understand wherher you have miirored disk or not?
1-
When you run vgdisplay -v VGname
you can see some information like;

LV Name
LV Status
LV Size (Mbytes
Current LE
Allocated PE
Used PV

try to focus Current LE & Allocated PE
When a mirrored disks in a VG
Allocated PE must 2X of Current PE

2-run lvdisplay -v for each lvol|more

Again when mirrored then you have to 2 disk address left&right

For example for my system;

baan01:/#lvdisplay -v /dev/vg00/lvol1 |more
--- 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) 256
Current LE 16
Allocated PE 32
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/c0t6d0 16 16
/dev/dsk/c3t6d0 16 16

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c0t6d0 00000 current /dev/dsk/c3t6d0 00000 current
00001 /dev/dsk/c0t6d0 00001 current /dev/dsk/c3t6d0 00001 current
00002 /dev/dsk/c0t6d0 00002 current /dev/dsk/c3t6d0 00002 current
00003 /dev/dsk/c0t6d0 00003 current /dev/dsk/c3t6d0 00003 current
00004 /dev/dsk/c0t6d0 00004 current /dev/dsk/c3t6d0 00004 current
00005 /dev/dsk/c0t6d0 00005 current /dev/dsk/c3t6d0 00005 current
00006 /dev/dsk/c0t6d0 00006 current /dev/dsk/c3t6d0 00006 current
00007 /dev/dsk/c0t6d0 00007 current /dev/dsk/c3t6d0 00007 current
00008 /dev/dsk/c0t6d0 00008 current /dev/dsk/c3t6d0 00008 current
00009 /dev/dsk/c0t6d0 00009 current /dev/dsk/c3t6d0 00009 current
00010 /dev/dsk/c0t6d0 00010 current /dev/dsk/c3t6d0 00010 current
00011 /dev/dsk/c0t6d0 00011 current /dev/dsk/c3t6d0 00011 current
00012 /dev/dsk/c0t6d0 00012 current /dev/dsk/c3t6d0 00012 current
00013 /dev/dsk/c0t6d0 00013 current /dev/dsk/c3t6d0 00013 current
00014 /dev/dsk/c0t6d0 00014 current /dev/dsk/c3t6d0 00014 current
00015 /dev/dsk/c0t6d0 00015 current /dev/dsk/c3t6d0 00015 current

so i have 2 Physical disks and the address
c0t6d0 & c3t6do and there are mirrored.

Hope this helps,

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Geoff Wild
Honored Contributor

Re: How to tell if a disk is mirrored in HP-UX?

See attached script called chkdsks

Output like:

# chkdisks
Logical Volume Filesystem Mirrored?
-------------- ---------- ---------
/dev/vg00/lvol1 /stand yes
/dev/vg00/lvol2 yes
/dev/vg00/lvol3 / yes
/dev/vg00/lvol4 /tmp yes
/dev/vg00/lvol5 /home yes
/dev/vg00/lvol6 /opt yes
/dev/vg00/lvol7 /usr yes
/dev/vg00/lvol8 /var yes


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.
andrew sun_1
Occasional Advisor

Re: How to tell if a disk is mirrored in HP-UX?

thanks