Thursday, April 14, 2011

Setting up HP-UX iscsi configuration

Verify the iSCSI initiator is running
# iscsiutil -l

server1# /opt/iscsi/bin/iscsiutil -l
Initiator Name : iqn.1986-03.com.hp:server1.128931587
Initiator Alias :

Authentication Method :
CHAP Method : CHAP_UNI
Initiator CHAP Name :
CHAP Secret :
NAS Hostname :
NAS Secret :
Radius Server Hostname :
Header Digest : None,CRC32C (default)
Data Digest : None,CRC32C (default)
SLP Scope list for iSLPD :

Add the discovery target address
/opt/iscsi/bin/iscsiutil -a -I 10.6.8.199

Confirm connection to volume targets
iscsiutil –p –D



Discovery Target Information
----------------------------

Target # 1
-----------
IP Address : elomp1227dm2
iSCSI TCP Port : 3260
iSCSI Portal Group Tag : 1

User Configured:
----------------

Authenticaton Method :
CHAP Method : CHAP_UNI
Initiator CHAP Name :
CHAP Secret :
Header Digest : None,CRC32C (default)
Data Digest : None,CRC32C (default)

Target # 2
-----------
IP Address : inompd3fbno1
iSCSI TCP Port : 3260
iSCSI Portal Group Tag : 1

User Configured:
----------------

Authenticaton Method :
CHAP Method : CHAP_UNI
Initiator CHAP Name :
CHAP Secret :
Header Digest : None,CRC32C (default)
Data Digest : None,CRC32C (default)


A target is the same as a LUN on the SAN.

Confirm the Devices are Visible
ioscan -fnH 255

Class I H/W Path Driver S/W State H/W Type Description
===========================================================================
iscsi 0 255/0 iscsi CLAIMED VIRTBUS iSCSI Virtual Node
ext_bus 4 255/0/0.0 iscsial CLAIMED INTERFACE iSCSI-SCSI Protocol Interface
target 9 255/0/0.0.0 tgt CLAIMED DEVICE
disk 5 255/0/0.0.0.0 sdisk CLAIMED DEVICE EMC Celerra
/dev/dsk/c4t0d0 /dev/rdsk/c4t0d0
disk 6 255/0/0.0.0.1 sdisk CLAIMED DEVICE EMC Celerra
/dev/dsk/c4t0d1 /dev/rdsk/c4t0d1
disk 7 255/0/0.0.0.2 sdisk CLAIMED DEVICE EMC Celerra
ext_bus 6 255/0/2.0 iscsial CLAIMED INTERFACE iSCSI-SCSI Protocol Interface
target 25 255/0/2.0.0 tgt CLAIMED DEVICE
disk 25 255/0/2.0.0.0 sdisk CLAIMED DEVICE NETAPP LUN
/dev/dsk/c6t0d0 /dev/rdsk/c6t0d0
ext_bus 7 255/0/3.0 iscsial CLAIMED INTERFACE iSCSI-SCSI Protocol Interface
target 26 255/0/3.0.0 tgt CLAIMED DEVICE
disk 26 255/0/3.0.0.0 sdisk CLAIMED DEVICE NETAPP LUN
/dev/dsk/c7t0d0 /dev/rdsk/c7t0d0
disk 27 255/0/3.0.0.1 sdisk CLAIMED DEVICE NETAPP LUN
/dev/dsk/c7t0d1 /dev/rdsk/c7t0d1
disk 28 255/0/3.0.0.2 sdisk CLAIMED DEVICE NETAPP LUN
/dev/dsk/c7t0d2 /dev/rdsk/c7t0d2
disk 29 255/0/3.0.0.3 sdisk CLAIMED DEVICE NETAPP LUN


If a HW path does not have a device file use insf -e to generate one..

Troubleshooting iSCSI issues


A change in the IQN on the host will lead to LUNs not being available..
the first time a server is booted after the iscsi SW is installed an IQN is created as displayed in the iscsiutil -l command. the storage team uses the IQN much like a WWPN to allow a host to see the LUNs. If storage is nolonger visible ask the storage team what IQN associated witht he host are they looking for. and if it has changed on the server side use

/opt/iscsi/bin/iscsiutil -i -N 'iqn.1986-03.com.hp:server1.128931587'
where the oiption after the -N is the IQN that you are changing to/ then reboot the server to make sure the server properly connects to the iSCSI NAShead. The IQN is stored in the Kernel Registry Service with data stored in /stand/krs/* in a non text format.

Clear the Kernel Registry of iSCSI information..

HP-UX accommodates 256 iSCSI sessions and does not clear block device links to old targets including deleted snapshots. You must manually clear the registry of stale sessions once this maximum is reached in order to establish new iSCSI sessions. Note that clearing the kernel registry clears out all configurations, so after clearing you will need to recreate any old configurations you want to preserve.
Here is the procedure to clear out your iSCSI configuration from the kernel registry:

1.Before deleting all the iSCSI information in the registry and rebooting the system, preserve the original configuration as follows:
# ioscan -kfn > /tmp/ioscan.pre_shutdown.out
# iscsiutil -p > /tmp/iscsi_tgt.pre_shutdown.out

2.Delete all iSCSI information from the registry (all steps must be done as root):
# echo "iscsi_krs_delete/W 1" |adb -w /stand/vmunix /dev/kmem
(assuming system was booted from /stand/vmunix ...)
# iscsiutil –x

3.Reboot the system immediately.


4.Once the system is back online, you will have to recreate your iSCSI configuration

No comments: