IBM FlashSystem

IBM FlashSystem

Find answers and share expertise on IBM FlashSystem

 View Only
Expand all | Collapse all

Getting used capacity of each individual disk with Spectrum Virtual API

  • 1.  Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Tue April 11, 2023 04:35 PM

    Hello,

      Is it possible to get the total storage capacity as well as the used storage capacity of each individual hard disk in a FS5100 using the Spectrum Virtualize API?



    ------------------------------
    Cloud Comp
    ------------------------------


  • 2.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Wed April 12, 2023 05:15 AM

    When the FS5100 has FCM's you can see Total and Used capacity: 

    IBM_FlashSystem:FS5100:superuser>lsdrive 0
    id 0
    ...
    tech_type tier0_flash
    capacity 20.0TB
    ...
    write_endurance_used 0
    write_endurance_usage_rate
    replacement_date
    transport_protocol nvme
    compressed yes
    physical_capacity 4.36TB
    physical_used_capacity 138.22MB
    effective_used_capacity 3.60GB

    For more info see: FlashSystem BestPractices and Performance Guidelines chapter 3.1.3



    ------------------------------
    T Masteen
    ------------------------------



  • 3.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Thu April 13, 2023 12:45 AM

    Hello,

    Thanks for the answer.

    Another question we have is this:

     Can the 'lsdrive' command acquire a list of all the physical hard drives along with their id, capacity, used capacity, and status and return it in a single list of dictionaries through the Spectrum Virtualize web API?

    If a FS5100 has 912 physical drives and we were to acquire the above info on each of them, would that mean we would have to send the 'lsdrive [disk ID]" command through HTTP requests 912 times in order to get all the capacity info? Does the 'lsdrive' command accept parameters for showing the capacity, used capacity info when returning the list of drives?

    Or are there any other alternative methods that can help achieve the same result?

    Thanks in advance.



    ------------------------------
    Cloud Comp
    ------------------------------



  • 4.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Thu April 13, 2023 02:42 AM
    One way of getting the information you want is by cli:
     
    lsdrive -nohdr | while read -a foo; do lsdrive ${foo[0]}; done
     
    With this you get all the info of all drives.
    You can adjust this to get just the info you want.
    Have a look at the next two blogs. I think you will get the info you want.
     
     
    https://barrywhytestorage.blog/2020/01/09/how-to-script-on-spectrum-virtualize-tips-and-tricks/#examples
     
    https://barrywhytestorage.blog/2020/08/03/tips-and-tricks-using-the-spectrum-virtualize-rest-api/
     
     


    ------------------------------
    T Masteen
    ------------------------------



  • 5.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Thu April 13, 2023 01:37 PM

    If you're looking for detailed data on the drives, it's going to be something that you'll have to script out and possibly need to format the results of. You can do lsdrive without being specific and detailed but it gives you less detailed information.  This is from the Knowledge Center (sorry, IBM documentation)

    id:status:error_sequence_number:use:tech_type:capacity:mdisk_id:mdisk_name:member_id:enclosure_id:slot_id:auto_manage:drive_class_id 0:online::member:tier0_flash:20GB:0:mdisk0:0:1:2:active:0 1:offline:345:member:tier0_flash:20GB:0:mdisk0:0:1:3:idle:0 2:online::member:tier0_flash:20GB:0:mdisk0:0:1:4:active:0

    So, you can see that it's not nearly as detailed as you're asking about.

    This is the kind of thing that maybe you could do an ansible script to gather the information that you're looking for and create as facts, then format into a template.



    ------------------------------
    Ian Wright
    ------------------------------



  • 6.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Fri April 14, 2023 11:57 AM

    USE THE -gui SWITCH!

    lsdrive -gui -delim :

    id:status:error_sequence_number:use:UID:tech_type:capacity:block_size:vendor_id:product_id:FRU_part_number:FRU_identity:RPM:firmware_level:FPGA_level:mdisk_id:mdisk_name:member_id:enclosure_id:slot_id:node_id:node_name:quorum_id:port_1_status:port_2_status:was_spare:interface_speed:auto_manage:drive_class_id:write_endurance_used:transport_protocol:compressed:physical_capacity:physical_used_capacity:effective_used_capacity
    0:online::member:4e564d653031454b323331595331414247393158304230001014101406490000:tier0_flash:40.0TB:512:IBM-C062:10140649:03LG654:11S01EK231YS1ABG91X0B0::1_2_12  ::0:DR6_15x19.2TB_FCM_10PQ1S_IOG0:0:1:1:::1:online:online:no::inactive:0:0:nvme:yes:17.46TB:4.29TB:10.37TB
    1:online::member:4e564d653031454b32333159533139424738434530314e001014101406490000:tier0_flash:40.0TB:512:IBM-C062:10140649:03LG654:11S01EK231YS19BG8CE01N::1_2_12  ::0:DR6_15x19.2TB_FCM_10PQ1S_IOG0:1:1:15::::online:online:no::inactive:0:0:nvme:yes:17.46TB:4.29TB:10.37TB



    ------------------------------
    Randy Frye
    Senior Storage Administrator
    D&H Distributing
    Harrisburg PA
    7173647948
    ------------------------------



  • 7.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Mon April 24, 2023 04:13 AM

    Hello,
    thanks for all the answers above.

    Another problem we've encountered is that we want to display the FS5100's CPU info in our client program. The Spectum Virtualize documentation indicates there is a "lsnodehw" command that can show the CPU model, but this command seems to be unavailable in our client's FS5100s. Are there any functionalities that need to be enabled to make this command available, or are there any alternative methods that can be used to acquire the CPU info?

    Thanks in advance,
    Cloud Comp



    ------------------------------
    Cloud Comp
    ------------------------------



  • 8.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Mon April 24, 2023 08:27 AM

    The lsnodecanistervpd command will help.
    Syntax
     
    >>-lsnodevpd--|lsnodecanistervpd--+---------+------------------->
                                      '- -nohdr-'   
     
    >--+--------------------+--+-object_id---+---------------------><
       '- -delim--delimiter-'  '-object_name-'   
     
     
    For more details type 'help lsnodecanistervpd'.


    ------------------------------
    T Masteen
    ------------------------------



  • 9.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Tue April 25, 2023 06:33 PM

    Hola!

    Command lsnodehw is intended to be used in SVC. The equivalent command for FlashSystems is lsnodecanisterhw

    The command lsnodecanistervpd pointed by T Masteen also works :D



    ------------------------------
    Luis Lopez
    ------------------------------



  • 10.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Wed April 26, 2023 03:59 AM

    That's true!
    Alternatively one could use the SVC CLI commands with prefix svcinfo, so all commands and scripts are compatible with SVC, Storwize and FlashSystems.
    Example:
    svcinfo lsnodevpd <node_id_or_name>



    ------------------------------
    Christian Schroeder
    IBM SpecV Storage Support with Passion
    ------------------------------



  • 11.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Wed April 26, 2023 06:25 AM

    Minor corrections:

    lsnodevpd and lsnodecanistervpd are the CLI commands used to dump out all the details (like partnumbers, vendors, etc).

    see https://www.ibm.com/docs/en/flashsystem-5x00?topic=STHGUJ/com.ibm.flashsystem.5100.8401.doc/svc_lsnodecanistervpd.htm

    There is a service CLI command to list the committed vs installed hardware (used when doing HBA or Memory upgrades or to identify illegal HW configs)

    sainfo lshardware -- This works on both SVC and FlashSystem boxes
    https://www.ibm.com/docs/en/flashsystem-5x00/8.3.x?topic=sic-lshardware-3

    The System CLI corollary of this service CLI is 

    lsnodecanisterhw  for the FlashSystem/Enclosure based products
    and lsnodehw for the SVC Hardware
    See https://www.ibm.com/docs/en/flashsystem-5x00/8.3.x?topic=commands-lsnodecanisterhw

    Some additional Caveats:

    * the -gui flag is internal and we do not guarantee backwards compatibility (although generally we try not to break things).

    * I question why you are so interested in individual drive capacity info instead of the pool level, and if you really need it, I would recommend Storage Insights as an already available system that has the advantage of predictive alerts for capacity and utilisation.  If you are happy with what you have, that's great, but I think the features SI offers along with the alerting and reporting would be really useful (it is also incredibly helpful for support issues!)

    I hope that helps!



    ------------------------------
    Evelyn Perez
    ------------------------------



  • 12.  RE: Getting used capacity of each individual disk with Spectrum Virtual API

    Posted Thu April 27, 2023 06:10 AM

    Hey Christian - I recommend that don't depend on svcinfo or svctask. Those have been phased out and will not exist forever. We're just slow to clean up legacy/outdated commands so folks have lots of time to move over.  svcinfo/svctask are the OLD method that is being phased out.  Similarly, don't use admin@CLUSTERIP to log in!  Use a real user!  



    ------------------------------
    Evelyn Perez
    ------------------------------