<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Map Nimble volume serial number to volume name under Linux in Array Setup and Networking</title>
    <link>https://community.hpe.com/t5/array-setup-and-networking/map-nimble-volume-serial-number-to-volume-name-under-linux/m-p/6984845#M1497</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With further research I noticed that the &lt;STRONG&gt;iscsi target iqn string&lt;/STRONG&gt; generated by the Nimble Storage array i&lt;STRONG&gt;ncludes the Ascii volume-name&lt;/STRONG&gt; and can be easily parsed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Linux /dev/disk/&lt;STRONG&gt;by-path&lt;/STRONG&gt; directory contains symbolic links whose values contain the Nimble controller NIC IP address, the volume-name, and the Linux disk name, just needing some parsing to separate out the fields.&amp;nbsp; This parsing in vendor-specific to Nimble. Other vendors format their target iqn names differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the output of a "ls -l" of the by-path symbolic link in RHEL/CentOS Linux, with the interesting fields highlighted (bold underline)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DISK="sdb"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;"ls -l /dev/disk/by-path | grep nimble | grep "/$DISK"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;lrwxrwxrwx 1 root root 9 Nov 17 17:58 ip-&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;10.0.0.1&lt;/STRONG&gt;&lt;/SPAN&gt;:3260-iscsi-iqn.2007-11.com.nimblestorage:&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;gluster-test&lt;/STRONG&gt;&lt;/SPAN&gt;-v479411925e4e2edd.00000001.19da3f4f-lun-0 -&amp;gt; ../../&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;sdb&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;# Crack the by-path symbolic link to yield three fields which are highlighted above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#&amp;nbsp;&amp;nbsp; TARGET_IP&amp;nbsp;&amp;nbsp; - signifies the NIC port on the controller&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#&amp;nbsp;&amp;nbsp; VOLUME_NAME - Name of the volume on the Nimble Storage Array&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#&amp;nbsp;&amp;nbsp; DISK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - The Linux disk name, such as "sdb"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Linux "scsi_id" command provides the volume serial number&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/lib/udev/scsi_id --whitelisted /dev/$DISK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Combine the two sources of information, and you have the Linux name, the serial number, the Nimble NIC IP address (indicating the NIC port), and the Nimble volume name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the script output:of an example script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;./nimble_get_vol_name sdb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Linux disk name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sdb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Volume Serial #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 289ca79ba4f1758ca6c9ce9004f3fda19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble NIC IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10.0.0.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble volume name&amp;nbsp;&amp;nbsp; : gluster-test&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a multipath device:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;./nimble_get_vol_name dm-2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Linux multipath name : dm-2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Child disk paths ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Linux disk name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sdb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Volume Serial #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 289ca79ba4f1758ca6c9ce9004f3fda19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble NIC IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10.0.0.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble volume name&amp;nbsp;&amp;nbsp; : gluster-test&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Linux disk name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sdc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Volume Serial #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 289ca79ba4f1758ca6c9ce9004f3fda19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble NIC IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10.0.1.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble volume name&amp;nbsp;&amp;nbsp; : gluster-test&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the example script "nimble_get_vol_name"&lt;/P&gt;&lt;P&gt;The end-of-line characters have been converted to Windows format for easy viewing.&lt;/P&gt;&lt;P&gt;Don't forget to add execute permission to the file "&lt;SPAN style="font-family: courier new,courier;"&gt;chmod +x nimble_get_vol_name&lt;/SPAN&gt;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Nov 2016 23:49:45 GMT</pubDate>
    <dc:creator>davidbaril127</dc:creator>
    <dc:date>2016-11-21T23:49:45Z</dc:date>
    <item>
      <title>Map Nimble volume serial number to volume name under Linux</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/map-nimble-volume-serial-number-to-volume-name-under-linux/m-p/6984844#M1496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The document "Nimble Storage for Red Hat Enterprise Linux 6 &amp;amp; Oracle Linux 6" shows how to get the volume serial number using the Linux "scsi_id" command.&amp;nbsp; This document also shows the source code to a small ksh script named "vol-info" that uses the Nimble ssh CLI interface to create a table mapping the cryptic volume serial number into the Nimble "volume name".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This volume serial number -to- volume name mapping is very useful for Linux scripting, since the core identifier of the Nimble iscsi volume is the cryptic serial number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scsi serial number displayed using the scsi_id command is read from fields on the SCSI vital product data (VPD) pages, typically VPD page 0x83.&amp;nbsp; There are many other standardized and vendor-specific VPD pages that are used to pass useful information about a SCSI LUN. The Linux command "sg_vpd" can be used to display the contents of these VPD pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that Nimble has a very powerful and functional scripting interface using a RESTfull API. and the ssh CLI commands. These interfaces can be used to provide a serial-number to volume-name mapping, as the example Nimble CLI script mentioned above does.&amp;nbsp; However, these interfaces are more complex to use and require some form of secure authentication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some storage vendors make the "volume name" and/or "volume description" available using the optional or vendor-specific fields within the SCSI VPD information pages.&amp;nbsp; As such, this information can be easily queried from Linux, and provide information in "human-readable" form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried querying all the SCSI VPD pages that the Nimble storage array advertised as being supported, and found nothing that looked like a "volume name" or "volume description".&amp;nbsp; I did not go searching for hidden VPD pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an easy mechanism to retrieve the "volume name" of an attached Nimble iSCSI volume ... from the Linux side?&amp;nbsp; This will likely eventually become a name alias for Linux dm-multipath.&amp;nbsp; The target iqn and SCSI serial numbers are easily available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dave B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 17:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/map-nimble-volume-serial-number-to-volume-name-under-linux/m-p/6984844#M1496</guid>
      <dc:creator>davidbaril127</dc:creator>
      <dc:date>2016-11-21T17:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Map Nimble volume serial number to volume name under Linux</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/map-nimble-volume-serial-number-to-volume-name-under-linux/m-p/6984845#M1497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With further research I noticed that the &lt;STRONG&gt;iscsi target iqn string&lt;/STRONG&gt; generated by the Nimble Storage array i&lt;STRONG&gt;ncludes the Ascii volume-name&lt;/STRONG&gt; and can be easily parsed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Linux /dev/disk/&lt;STRONG&gt;by-path&lt;/STRONG&gt; directory contains symbolic links whose values contain the Nimble controller NIC IP address, the volume-name, and the Linux disk name, just needing some parsing to separate out the fields.&amp;nbsp; This parsing in vendor-specific to Nimble. Other vendors format their target iqn names differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the output of a "ls -l" of the by-path symbolic link in RHEL/CentOS Linux, with the interesting fields highlighted (bold underline)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DISK="sdb"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;"ls -l /dev/disk/by-path | grep nimble | grep "/$DISK"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;lrwxrwxrwx 1 root root 9 Nov 17 17:58 ip-&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;10.0.0.1&lt;/STRONG&gt;&lt;/SPAN&gt;:3260-iscsi-iqn.2007-11.com.nimblestorage:&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;gluster-test&lt;/STRONG&gt;&lt;/SPAN&gt;-v479411925e4e2edd.00000001.19da3f4f-lun-0 -&amp;gt; ../../&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;sdb&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;# Crack the by-path symbolic link to yield three fields which are highlighted above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#&amp;nbsp;&amp;nbsp; TARGET_IP&amp;nbsp;&amp;nbsp; - signifies the NIC port on the controller&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#&amp;nbsp;&amp;nbsp; VOLUME_NAME - Name of the volume on the Nimble Storage Array&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#&amp;nbsp;&amp;nbsp; DISK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - The Linux disk name, such as "sdb"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Linux "scsi_id" command provides the volume serial number&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/lib/udev/scsi_id --whitelisted /dev/$DISK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Combine the two sources of information, and you have the Linux name, the serial number, the Nimble NIC IP address (indicating the NIC port), and the Nimble volume name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the script output:of an example script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;./nimble_get_vol_name sdb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Linux disk name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sdb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Volume Serial #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 289ca79ba4f1758ca6c9ce9004f3fda19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble NIC IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10.0.0.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble volume name&amp;nbsp;&amp;nbsp; : gluster-test&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a multipath device:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;./nimble_get_vol_name dm-2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Linux multipath name : dm-2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Child disk paths ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Linux disk name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sdb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Volume Serial #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 289ca79ba4f1758ca6c9ce9004f3fda19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble NIC IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10.0.0.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble volume name&amp;nbsp;&amp;nbsp; : gluster-test&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Linux disk name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sdc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Volume Serial #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 289ca79ba4f1758ca6c9ce9004f3fda19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble NIC IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10.0.1.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Nimble volume name&amp;nbsp;&amp;nbsp; : gluster-test&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the example script "nimble_get_vol_name"&lt;/P&gt;&lt;P&gt;The end-of-line characters have been converted to Windows format for easy viewing.&lt;/P&gt;&lt;P&gt;Don't forget to add execute permission to the file "&lt;SPAN style="font-family: courier new,courier;"&gt;chmod +x nimble_get_vol_name&lt;/SPAN&gt;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 23:49:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/map-nimble-volume-serial-number-to-volume-name-under-linux/m-p/6984845#M1497</guid>
      <dc:creator>davidbaril127</dc:creator>
      <dc:date>2016-11-21T23:49:45Z</dc:date>
    </item>
  </channel>
</rss>

