1833038 Members
2481 Online
110049 Solutions
New Discussion

/etc/lvmtab query

 

/etc/lvmtab query

I have a two node cluster running Serviceguard. How do I determine from /etc/lvmtab the relationship of disks in the same volume group, so I can add a dual cluster lock disk to the Serviceguard configuration?
6 REPLIES 6

Re: /etc/lvmtab query


strings /etc/lvmtab

will list all the volume groups, and the disks in them.

Why do you want a dual cluster lock? These should be used in very specific scenarios only as described here:

http://docs.hp.com/hpux/onlinedocs/B3936-90065/B3936-90065.html

(near bottom of page - section entitled "Dual Lock Disk")

HTH

Duncan

I am an HPE Employee
Accept or Kudo

Re: /etc/lvmtab query

I have a campus cluster and therefore need a dual lock disk. On one site I have vg01 with two mirrored disks which are connected via fibre to a second site. Do you know how I determine which is the primary disk and the mirror in vg01 on the 2nd site?
James R. Ferguson
Acclaimed Contributor

Re: /etc/lvmtab query

Hi Malcolm:

Since mirroring is implemented the level of the logical volume, you need to map the logical extents to a physical disk to identify which disk is the primary and which is the secondary (or tertiary) mirror.

Use the 'v'erbose option of 'lvdisplay to see the physical disk relationships:

For instance:

# lvdisplay -v /dev/vg00/lvol1

..might return:

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 /dev/dsk/c0t6d0 0000 current /dev/dsk/c2t0d2 0000 current
0001 /dev/dsk/c0t6d0 0001 current /dev/dsk/c2t0d2 0001 current
0002 /dev/dsk/c0t6d0 0002 current /dev/dsk/c2t0d2 0002 current

...hence, /dev/dsk/c2t0d2 are mirrors of /dev/dsk/c0t6d0.

Regards!

...JRF...

Re: /etc/lvmtab query

I cannot do this for vg01 as it is not mounted on the standby server, I suppose I'll have to wait till the package is running on standby to find out.
Bill McNAMARA_1
Honored Contributor

Re: /etc/lvmtab query

Multiple "disk" device files may represent on single disk.

ie. the device file /dev/dsk/c1t2d0 may be an alternate path to /dev/dsk/c2t3d0
lvmtab will not tell you this.
vgdisplay will.
If you see

strings /etc/lvmtab
.
.
/dev/vg01
/dev/dsk/c2t3d0
/dev/dsk/c1t2d0
.
.

and vgdisplay vg01
.
.
/dev/dsk/c2t3d0
/dev/dsk/c1t2d0 Alternate Path
.
.

Then the two are the same 'disk' - just accessed from a different hardware path

I quote disk because it should be refered to as a PV to be really correct.

In any case, ioscan -fnkC disk
will give you the info on hardware addressing (physical) versus the device file logical addressing, and you can identify uniqueness from this and the vgdisplay combined.

vgdisplay itself will tell you how many PVs are in the vg, so that should be a good starting point.

Later,
Bill

It works for me (tm)
Stephen Doud
Honored Contributor

Re: /etc/lvmtab query

Hello Malcolm,

Please refer to Duncan's link for the very few reasons why you ought to use a dual cluster lock disk! If your cluster meets those requirements, use the following method to find the same disk between nodes.

Use this form of the cmquerycl command to discover each disk's "serial number":

# cmquerycl -l lvm -T 3 -n eon -n ion | grep "added disk"

I used this form of the command to get the following list:

# cmquerycl -l lvm -T 3 -n eon -n ion | grep "added disk" | grep dsk | awk '{print $2,$7," " $11," " $10}' | sort -n -k 3,3

(eon) /dev/dsk/c0t13d0 8.13.0 997126883)
(ion) /dev/dsk/c0t13d0 8.13.0 997126883)
(eon) /dev/dsk/c0t14d0 8.14.0 996766697)
(ion) /dev/dsk/c0t14d0 8.14.0 996766697)
(eon) /dev/dsk/c0t15d0 8.15.0 996766708)
(ion) /dev/dsk/c0t15d0 8.15.0 996766708)
(eon) /dev/dsk/c0t2d0 8.2.0 1004024064)
(ion) /dev/dsk/c0t2d0 8.2.0 1004024064)
(eon) /dev/dsk/c0t3d0 8.3.0 1024408633)
(ion) /dev/dsk/c0t3d0 8.3.0 1024408633)
(eon) /dev/dsk/c0t4d0 8.4.0 1017781080)
(ion) /dev/dsk/c0t4d0 8.4.0 1017781080)
(eon) /dev/dsk/c1t5d0 52.5.0 949954632)
(ion) /dev/dsk/c1t5d0 52.5.0 960302228)
(eon) /dev/dsk/c1t6d0 52.6.0 941219124)
(ion) /dev/dsk/c1t6d0 52.6.0 941226344)

The last string in each row is the "serial number". Those that match between nodes are the same disk.

-s.