Background
HP-UX requires at least one LUN device to be present with LUN or SCSI ID 0 in order to scan the corresponding SCSI bus. This LUN ID 0 device will be used as a controller device to query the underlying devices. On a typical SAN environment this will mean that the controller device will be used as an array controller device and that multiple of such devices will be present (depending on how the storage system is presenting the LUNs).
In no case should these devices be removed (unless it serves as a duplicate). Removing these devices will cause tools like
ioscan
to fail to see corresponding hardware/LUNs (reporting as NO_HW
or offline
state):
# ioscan -funNC ctl
Class I H/W Path Driver S/W State H/W Type Description
==================================================================
ctl 4 64000/0xfa00/0x1e esctl CLAIMED DEVICE HP OPEN-XPXP7
/dev/pt/pt4
ctl 32 64000/0xfa00/0x113 esctl CLAIMED DEVICE HP OPEN-XPXP7
/dev/pt/pt32
ctl 42 64000/0xfa00/0x165 esctl CLAIMED DEVICE HP OPEN-XPXP7
/dev/pt/pt42
ctl 24 64000/0xfa00/0x239 esctl CLAIMED DEVICE HP OPEN-XPXP7
/dev/pt/pt24
ctl 19 64000/0xfa00/0x945 esctl NO_HW DEVICE IBM 2145
/dev/pt/pt19
ctl 30 64000/0xfa00/0xa01 esctl NO_HW DEVICE IBM 2145
/dev/pt/pt30
ctl 40 64000/0xfa00/0xabd esctl NO_HW DEVICE IBM 2145
/dev/pt/pt40
ctl 41 64000/0xfa00/0xabe esctl NO_HW DEVICE IBM 2145
/dev/pt/pt41
Identification
LUN ID 0 devices can be identified by looking at the LUN ID field in the ioscan
output:
# ioscan -m lun
Class I Lun H/W Path Driver S/W State H/W Type Health Description
======================================================================
ctl 2 64000/0xfa00/0xc esctl CLAIMED DEVICE online HP OPEN-XPXP7
0/0/1/0.0x50060e8007e2b160.0x0
0/0/2/0.0x50060e8007e2b170.0x0
0/0/5/0.0x50060e8007e2b131.0x0
0/0/4/0.0x50060e8007e2b121.0x0
/dev/pt/pt2
disk 4 64000/0xfa00/0xd esdisk CLAIMED DEVICE online HP OPEN-V
0/0/1/0.0x50060e8007e2b160.0x4000000000000000 <----
0/0/5/0.0x50060e8007e2b131.0x4000000000000000 <----
0/0/2/0.0x50060e8007e2b170.0x4000000000000000 <----
0/0/4/0.0x50060e8007e2b121.0x4000000000000000 <----
/dev/disk/disk4 /dev/disk/disk4_p2 /dev/rdisk/disk4 /dev/rdisk/disk4_p2
/dev/disk/disk4_p1 /dev/disk/disk4_p3 /dev/rdisk/disk4_p1 /dev/rdisk/disk4_p3
disk 5 64000/0xfa00/0xe esdisk CLAIMED DEVICE online HP OPEN-V
0/0/1/0.0x50060e8007e2b160.0x4003000000000000
0/0/5/0.0x50060e8007e2b131.0x4003000000000000
0/0/2/0.0x50060e8007e2b170.0x4003000000000000
0/0/4/0.0x50060e8007e2b121.0x4003000000000000
/dev/disk/disk5 /dev/rdisk/disk5
disk 6 64000/0xfa00/0xf esdisk CLAIMED DEVICE online HP OPEN-V
0/0/1/0.0x50060e8007e2b160.0x4001000000000000
0/0/5/0.0x50060e8007e2b131.0x4001000000000000
0/0/2/0.0x50060e8007e2b170.0x4001000000000000
0/0/4/0.0x50060e8007e2b121.0x4001000000000000
/dev/disk/disk6 /dev/rdisk/disk6
disk 7 64000/0xfa00/0x10 esdisk CLAIMED DEVICE online HP OPEN-V
0/0/1/0.0x50060e8007e2b160.0x4002000000000000
0/0/5/0.0x50060e8007e2b131.0x4002000000000000
0/0/2/0.0x50060e8007e2b170.0x4002000000000000
0/0/4/0.0x50060e8007e2b121.0x4002000000000000
/dev/disk/disk7 /dev/disk/disk7_p2 /dev/rdisk/disk7 /dev/rdisk/disk7_p2
/dev/disk/disk7_p1 /dev/disk/disk7_p3 /dev/rdisk/disk7_p1 /dev/rdisk/disk7_p3
disk 9 64000/0xfa00/0x18 esdisk CLAIMED DEVICE online HP OPEN-V
0/0/1/0.0x50060e8007e2b160.0x4004000000000000
0/0/5/0.0x50060e8007e2b131.0x4004000000000000
0/0/2/0.0x50060e8007e2b170.0x4004000000000000
0/0/4/0.0x50060e8007e2b121.0x4004000000000000
/dev/disk/disk9 /dev/rdisk/disk9
In the above example hardware device 64000/0xfa00/0xd
or disk /dev/disk/disk4
has a LUN ID of 4000 which translates in HP-UX speak to 0 (4000 minus 4000).
In order to see the corresponding controller device:
# ioscan -funN -C ctl
Class I H/W Path Driver S/W State H/W Type Description
==================================================================
ctl 2 64000/0xfa00/0xc esctl CLAIMED DEVICE HP OPEN-XPXP7
/dev/pt/pt2
How do we know that both the disk & controller device map to the same LUN? By looking at their WWID. Both devices will have the same WWID:
# scsimgr get_attr -H 64000/0xfa00/0xd -a wwid
SCSI ATTRIBUTES FOR LUN : 64000/0xfa00/0xd
name = wwid
current = 0x60060e8007e2b1000030e2b100006a00
default =
saved =
# scsimgr get_attr -H 64000/0xfa00/0xc -a wwid
SCSI ATTRIBUTES FOR LUN : 64000/0xfa00/0xc
name = wwid
current = 0x60060e8007e2b1000030e2b100006a00
default =
saved =
Very often the boot disk is the LUN ID 0 device because it is the first device to be ever presented to the host and the last one to be removed during a decommissioning. But this may not always be the case!
Multiple LUN ID 0 devices
In complex SAN environments it is not unusual to have multiple LUN ID 0 devices. If boot disks are not used, then special purpose LUNs should be used. For example: for small devices that will not be used for any other purpose but being a controller device. This also means that it should not be used to store any other data on (e.g. do not make it into a LVM physical volume or add it to a LVM volume group). It is therefore good practice to provision these LUNs with a very small size (e.g. 1 GB).
Leave a comment