Primary Storage

 View Only
  • 1.  Displaying the FlashSystem volume name under Linux

    Posted Fri September 06, 2024 06:21 AM

    Under AIX, lsmpio provides a convenient way to display the associated FlashSystem Volume Name of a disk device:

    # lsmpio -q

    Device           Vendor Id  Product Id       Size       Volume Name

    ---------------------------------------------------------------------------------

    hdisk0           IBM        2145               50.00GiB volume-aix64_altroot-46da1986-b

    hdisk1           IBM        2145               50.00GiB volume-aix64_rootvg-f5376485-d0

    Is this option also available under Linux, particularly under RHEL 9?



    ------------------------------
    Olaf Barth
    ------------------------------


  • 2.  RE: Displaying the FlashSystem volume name under Linux

    Posted Fri September 06, 2024 06:33 AM

    check "multipath -ll" output. 



    ------------------------------
    Nezih Boyacioglu
    ------------------------------



  • 3.  RE: Displaying the FlashSystem volume name under Linux

    Posted Fri September 06, 2024 07:50 AM

    This command gives me something like the UUID of the volume (wich is 60050763808102F40C000000000003EA), but not the volume name

    # multipath -ll
    mpatha (360050763808102f40c000000000003ea) dm-0 IBM,2145
    size=50G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
    |-+- policy='service-time 0' prio=50 status=active
    | |- 1:0:1:0 sde 8:64  active ready running
    | `- 2:0:1:0 sdc 8:32  active ready running
    `-+- policy='service-time 0' prio=10 status=enabled
      |- 1:0:0:0 sdg 8:96  active ready running
      `- 2:0:0:0 sda 8:0   active ready running



    ------------------------------
    Olaf Barth
    ------------------------------



  • 4.  RE: Displaying the FlashSystem volume name under Linux

    Posted Fri September 06, 2024 08:11 AM

    lsmpio -q gives you hdisk names which assigned by aix. it's not FlashSystem volume name.

    create a volume named "Olaf" in your flashsystem and map it to your aix host > cfgmgr > lsmpio -q and check the result :)



    ------------------------------
    Nezih Boyacioglu
    ------------------------------



  • 5.  RE: Displaying the FlashSystem volume name under Linux

    Posted Fri September 06, 2024 08:24 AM

    Done exactly like that. lsmpio shows the FlashSystem volume name:

    # lsmpio -q
    Device           Vendor Id  Product Id       Size       Volume Name
    ---------------------------------------------------------------------------------
    ...

    hdisk2           IBM        2145              100.00GiB OLAF



    ------------------------------
    Olaf Barth
    ------------------------------



  • 6.  RE: Displaying the FlashSystem volume name under Linux

    Posted Fri September 06, 2024 08:25 AM
    Edited by Nezih Boyacioglu Fri September 06, 2024 08:25 AM

    oh thats great! there is no equivalent command on linux to get device name. I read the latest lsmpio command options and you are absolutely right. :)



    ------------------------------
    Nezih Boyacioglu
    ------------------------------



  • 7.  RE: Displaying the FlashSystem volume name under Linux

    Posted Mon September 09, 2024 09:50 AM

    Don't recall the exact AIX version, but more recent versions (most likely >= AIX 7.2 TL5) does include "lsmpio -ql hdisk<X>" option, which does actually provide the volume name that has been defined on FlashSystem (see example below) :
    [rdc7vpc0lpr3]:/ >lsmpio -ql hdisk3
    Device:  hdisk3
              Vendor Id:  IBM
             Product Id:  2145
               Revision:  0000
               Capacity:  10.00GiB
           Machine Type:  9846
           Model Number:  AF8
             Host Group:  RDC7_LPR3
            Volume Name:  RDC7LPR3_VDBENCH_VD_4
            System Name:  LAB_SYSTEM
          Volume Serial:  600507681083827940000000000002F3  (Page 83 NAA)
    [rdc7vpc0lpr3]:/ >oslevel -s
    7300-02-01-2346
    [rdc7vpc0lpr3]:/ >

    For Linux, you may have to use some trickery with the inquiry page fields of the LUN and offsets..not sure if that info is publicly available. 



    ------------------------------
    Dharmesh Kamdar
    ------------------------------



  • 8.  RE: Displaying the FlashSystem volume name under Linux

    Posted Mon September 09, 2024 04:07 AM

    There's no standard method in SCSI to report the name of the volume so Linux cannot display the volume name (for any vendor).

    FlashSystem does report the volume name in a vendor-specific response which is what AIX uses but Linux won't issue this particular command. 

    It's a little manual (although I'm sure it could be scripted) but user_friendly_names will allow custom names to be assigned to volumes.

    e.g.

    in multipath.conf

    multipaths {
      multipath {
        wwid 36005076812fa80cf1000000000000020
        alias my_favourite_volume
      }
    }

    results in 

    my_favourite_volume (36005076812fa80cf1000000000000020) dm-41 IBM,2145

    I believe there's caveats when doing this particularly with system root devices so check the RHEL documentation before making any changes. 



    ------------------------------
    Chris Bulmer
    ------------------------------



  • 9.  RE: Displaying the FlashSystem volume name under Linux

    Posted Tue September 10, 2024 05:38 AM
      |   view attached
    Just trying to add some extra info, tested in my lab--
    Compliments of awesome work by Tom Bish!


     {we} have a Cent9  VM in my lab -

    [root@localhost etc]# more redhat-release
    CentOS Stream release 9

    Which is currently part of a Realtime Ransomware Detection video series --
    As part of the test, had both VMDK and RDMA mounted to it:

    [twbish@localhost ~]$ df -h
    Filesystem           Size  Used Avail Use% Mounted on
    devtmpfs             4.0M     0  4.0M   0% /dev
    tmpfs                1.8G     0  1.8G   0% /dev/shm
    tmpfs                732M   20M  713M   3% /run
    efivarfs             256K   26K  226K  11% /sys/firmware/efi/efivars
    /dev/mapper/cs-root   70G  6.3G   64G   9% /
    /dev/sda2            960M  407M  554M  43% /boot
    /dev/mapper/cs-home  2.0T  502G  1.5T  26% /home
    /dev/sda1            599M  7.5M  592M   2% /boot/efi
    /dev/sdb             590G  488G   73G  88% /home/twbish/Data2
    /dev/sdc            1007G  488G  469G  51% /home/twbish/Data3
    tmpfs                366M  108K  366M   1% /run/user/1000


    And per Chris's nice document, RHEL technote :  

    Net net  --

    "There are several different methods used to determine path priority, but the standard one using scsi commands relies on scsi inquiry device identification page 0x83 and the output from scsi report target port groups (RTPG) commands.
    So inquiry page 83 defines which port group the current device/path is located in, and the report target port groups defines that status of that port group. If either of those pieces of information are not available, then the "prio alua" path priority method cannot be specified within multipath for the associated storage device(s).
    Aka, see below for the INQ of 0x83 -
    The RTPG output defines port groups, their current state and what path states they support. Each port group within RTPG lists a target port group id along with a number of relative target port ids contained within the port group. This creates, in essense, a set of paired numbers of {port id, relative id} for each port group. The information from scsi inquiry defines a {port id, relative id} for the lun. Using that as a search key into the RTPG data, the kernel can determine what the path state and in turn the path priority is of the lun. "

    ergo , 
     Lets put the above into my VM, with both VMDK, and RDM mounted RDMA [over FC ]
    Ensure SU --

    [root@localhost etc]# sg_rtpg -v /dev/sda
        Report target port groups cdb: [a3 0a 00 00 00 00 00 00 04 00 00 00]
    Report target port groups:
    Fixed format, current; Sense key: Illegal Request
    Additional sense: Invalid command operation code
      Sense Key Specific: Error in Command: byte 0
    Report Target Port Groups command not supported


    And 

    [root@localhost twbish]# sg_inq -p 0x0 /dev/sda
    VPD INQUIRY: Supported VPD pages page
       Supported VPD pages:
         0x0    Supported VPD pages
         0xb0   Block limits (sbc2)
         0xb1   Block device characteristics (sbc3)
         0xb2   Logical block provisioning (sbc3)
    [root@localhost twbish]# sg_inq -p 0x83 /dev/sda



    In both SDA  {vmdk} examples above,  no luck. 

    ON THE OTHER HAND, However, a bit more luck on the RDM/RDMA. :   

    [root@localhost etc]# sg_inq -p 0x0 /dev/sdc
    VPD INQUIRY: Supported VPD pages page
       Supported VPD pages:
         0x0    Supported VPD pages
         0x80   Unit serial number
         0x83   Device identification
         0xb0   Block limits (sbc2)
         0xb1   Block device characteristics (sbc3)
         0xb2   Logical block provisioning (sbc3)
         0xc0   vendor: Firmware numbers (seagate); Unit path report (EMC)
         0xc2   vendor: Jumper settings (seagate); Software version (RDAC)

    And 


    [root@localhost etc]# sg_rtpg -v /dev/sdc
        Report target port groups cdb: [a3 0a 00 00 00 00 00 00 04 00 00 00]
    Report list length = 84
    Report target port groups:
      target port group id : 0x18 , Pref=0, Rtpg_fmt=0
        target port group asymmetric access state : 0x00
        T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 0, S_SUP : 0, AN_SUP : 0, AO_SUP : 0
        status code : 0x00
        vendor unique status : 0x00
        target port count : 08
        Relative target port ids:
          0x600
          0x601
          0x602
          0x603
          0x604
          0x605
          0x606
          0x607
      target port group id : 0x19 , Pref=0, Rtpg_fmt=0
        target port group asymmetric access state : 0x01
        T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 0, S_SUP : 0, AN_SUP : 0, AO_SUP : 0
        status code : 0x00
        vendor unique status : 0x00
        target port count : 08
        Relative target port ids:
          0xe00
          0xe01
          0xe02
          0xe03
          0xe04
          0xe05
          0xe06
          0xe07
    [root@localhost etc]#


    And 

    [root@localhost etc]# sg_inq -p 0x83 /dev/sdc
    VPD INQUIRY: Device Identification page
      Designation descriptor number 1, descriptor length: 20
        designator_type: NAA,  code_set: Binary
        associated with the Addressed logical unit
          NAA 6, IEEE Company_id: 0x5076
          Vendor Specific Identifier: 0x812840405
          Vendor Specific Identifier Extension: 0x7800000000000001
          [0x60050768128404057800000000000001]
      Designation descriptor number 2, descriptor length: 8
        transport: Fibre Channel Protocol for SCSI (FCP-5)
        designator_type: Relative target port,  code_set: Binary
        associated with the Target port
          Relative target port: 0xe00
      Designation descriptor number 3, descriptor length: 8
        transport: Fibre Channel Protocol for SCSI (FCP-5)
        designator_type: Target port group,  code_set: Binary
        associated with the Target port
          Target port group: 0x19



    Also, as part of the fun that Barry Whyte and Chris Bulmer have previously been so kind to post/blog, confirming the ALUA state:
    [root@localhost etc]# sg_rtpg -d /dev/sdc
    Report target port groups:
      target port group id : 0x18 , Pref=0, Rtpg_fmt=0
        target port group asymmetric access state : 0x00 (active/optimized)
        T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 0, S_SUP : 0, AN_SUP : 0, AO_SUP : 0
        status code : 0x00 (no status available)
        vendor unique status : 0x00
        target port count : 08
        Relative target port ids:
          0x600
          0x601
          0x602
          0x603
          0x604
          0x605
          0x606
          0x607
      target port group id : 0x19 , Pref=0, Rtpg_fmt=0
        target port group asymmetric access state : 0x01 (active/non optimized)
        T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 0, S_SUP : 0, AN_SUP : 0, AO_SUP : 0
        status code : 0x00 (no status available)
        vendor unique status : 0x00
        target port count : 08
        Relative target port ids:
          0xe00
          0xe01
          0xe02
          0xe03
          0xe04
          0xe05
          0xe06
          0xe07


    As you can see on the above, "active/ optimized" as well as {active, but non optimized}

    [root@localhost etc]# sg_rtpg  -d /dev/sdc | grep "access state"
        target port group asymmetric access state : 0x00 (active/optimized)
        target port group asymmetric access state : 0x01 (active/non optimized)


    YET--- going back to sda –    [vmdk!]

    [root@localhost etc]# sg_rtpg  -d /dev/sda | grep "access state"
    Report Target Port Groups command not supported
    sg_rtpg failed: Illegal request, Invalid opcode

    [Which we expect as VMware has its own layers, not directly seen by the guest VM os ]
    Hope this helps!
     -Andrew

    Andrew 'AJ' Greenfield

    WW Storage / Security


    +1 480-294-1342

    andrewjg@us.ibm.com

    Public Box Folder:  https://ibm.box.com/v/IBM-andrewgreenfield