ONTAP Hardware
ONTAP Hardware
In my scenario, LUNs are exposed to Solaris and Linux hosts via iSCSI. (We would be using FC connection too soon)
When LUNs are available to the host over iSCSI:
On a Linux host, I can get the LUN UUID from /dev/disk/by-id as follows -
$ ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 9 Nov 11 05:44 scsi-3600144f0dae0dd2200005280d1c80039 -> ../../sda
lrwxrwxrwx 1 root root 9 Nov 11 05:44 scsi-360a98000486e58676834746d7650724d -> ../../sdb
lrwxrwxrwx 1 root root 10 Nov 11 05:44 scsi-360a98000486e58676834746d7650724d-part1 -> ../../sdb1
In the above output, text in bold denotes the LUN UUID.
On a Solaris host, I am unable to get the UUID.
Since /dev/disk/by-id doesn't exist in Solaris, I am using iscsiadm command to get the LUN info.
####################################
# NetApp LUN exposed on a Solaris Host
####################################
bash-4.1# /usr/sbin/iscsiadm list target -S
Target: iqn.1992-08.com.netapp:sn.118057984
Alias: -
TPGT: 2000
ISID: 4000002a0000
Connections: 1
LUN: 0
Vendor: NETAPP
Product: LUN
OS Device Name: /dev/rdsk/c8t7d0s2
The LUN device on this Solaris host is appearing as /dev/rdsk/c8t7d0s2. With this, I am unable to get the LUN UUID.
When I try the same with a Sun ZFS filer, the OS Device Name contains the UUID.
#############################
# Sun ZFS LUN on a Solaris Host
#############################
bash-3.2# /usr/sbin/iscsiadm list target -S
Target: iqn.1986-03.com.sun:02:4b6d6ce8-9960-c7db-8742-f901f4eb95ca
Alias: kopnas301-iscsi
TPGT: 2
ISID: 4000002a0000
Connections: 1
LUN: 0
Vendor: SUN
Product: Sun Storage 7310
OS Device Name: /dev/rdsk/c1t600144F0DAE0DD22000052850E75003Ad0s2
How can I get the NetApp LUN UUID on a Solaris host?
Any help would be much appreciated.
Thanks
Hi Yasir,
Go through this thread, it contains the command to retrieve the LUN info
http://www.sunsolarisadmin.com/solaris-10/list-luns-attached-to-hbadisk-controllers-in-solaris-10/
http://blogs.warwick.ac.uk/peggleton/entry/disks_cfgadm_fcinfo/
I hope it may help you.
Regards,
Hari.
Thanks Hari for your response.
Both of the links have details when LUNs are connected through Fibre Channel (via HBA ports). However, I am using iSCSI connection.
The fcinfo
, luxamd commands won't work with iSCSI connection.
Those threads couldn't help me.
Thanks Hari.
Went through the above thread. In the thread, an example of SUN filer is taken.
As I have mentioned, if the LUN is coming from a SUN ZFS filer the LUN UUID can be obtained from /dev/dsk/.......
Only in case of NetApp, I am unable to figure out the LUN UUID.
As per the thread, I tried format command too, but I am not seeing the UUID.
bash-4.1# /sbin/format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c7t0d0 <LSI-MR9261-8i-2.12-556.90GB>
/pci@0,0/pci8086,340a@3/pci1000,9263@0/sd@0,0
1. c7t1d0 <LSI-MR9261-8i-2.12-278.46GB>
/pci@0,0/pci8086,340a@3/pci1000,9263@0/sd@1,0
2. c7t2d0 <LSI-MR9261-8i-2.12-278.46GB>
/pci@0,0/pci8086,340a@3/pci1000,9263@0/sd@2,0
3. c7t3d0 <LSI-MR9261-8i-2.12-278.46GB>
/pci@0,0/pci8086,340a@3/pci1000,9263@0/sd@3,0
4. c7t4d0 <LSI-MR9261-8i-2.12-278.46GB>
/pci@0,0/pci8086,340a@3/pci1000,9263@0/sd@4,0
5. c7t5d0 <LSI-MR9261-8i-2.12-278.46GB>
/pci@0,0/pci8086,340a@3/pci1000,9263@0/sd@5,0
6. c8t6d0 <NETAPP-LUN-7340-2.00TB>
/iscsi/disk@0000iqn.1992-08.com.netapp%3Asn.11805821507D0,0
7. c8t7d0 <NETAPP-LUN-7340-2.00TB>
/iscsi/disk@0000iqn.1992-08.com.netapp%3Asn.11805798407D0,0
8. c8t8d0 <NETAPP-LUN-7340-50.00GB>
/iscsi/disk@0000iqn.1992-08.com.netapp%3Asn.11805821507D0,1
9. c8t9d0 <NETAPP-LUN-7340-50.00GB>
/iscsi/disk@0000iqn.1992-08.com.netapp%3Asn.11805821507D0,2
10. c8t10d0 <NETAPP-LUN-7340-50.00GB>
/iscsi/disk@0000iqn.1992-08.com.netapp%3Asn.11805821507D0,3
11. c8t11d0 <NETAPP-LUN-7340-50.00GB>
/iscsi/disk@0000iqn.1992-08.com.netapp%3Asn.11805821507D0,4
12. c8t12d0 <NETAPP-LUN-7340-50.00GB>
/iscsi/disk@0000iqn.1992-08.com.netapp%3Asn.11805821507D0,5
13. c8t13d0 <NETAPP-LUN-7340-50.00GB>
/iscsi/disk@0000iqn.1992-08.com.netapp%3Asn.11805821507D0,6
- hit space for more or s to select -
bash-4.1#
Why do you need to know UUID? It is not directly visible on NetApp anyway and does not help in identifying LUNs.
I want to know the UUID to map the OS scsi device with the LUN on filer.
The LUN UUID can be fetched on NetApp with Data ONTAP api.