Flash Storage​

 View Only
  • 1.  PathID check with CLI or REST API

    Posted 02-22-2024 10:50

    I want to check with replication PathID an copygroup or individual ldev is using. I can see it in storage navigator but that's a GUI.

    pairdisplay/pairvolchk doesn't give this info.

    The PathID is given in the horcm file (or in your dataflow when you use Ops Center), I can check that but that doesn't tell me anything (you can change that afterwards) 



    ------------------------------
    Kom Marco
    Service Administrator
    ING Bank N.V.
    ------------------------------


  • 2.  RE: PathID check with CLI or REST API

    Posted 02-23-2024 08:57

    Hello Kom

    Such and impressive question! I must say I've been looking into it for a while and it's a bit difficult for me to find a quick answer.
    Since you're using Ops Center as per the post. I'm considering it as possible solution. Protector uses raidcom under the covers but I couldn't figure it out, but will keep looking.

    However in Protector, under Storage you'll see the remote paths, when you select a specific path it will show you the replications running on that path. Example below:



    ------------------------------
    William Jansen Van Nieuwenhuizen
    Hitachi Vantara
    ------------------------------



  • 3.  RE: PathID check with CLI or REST API

    Posted 02-23-2024 13:55

    William, 

    Indeed you can see it also in Ops Center, but I don't want to use a GUI to check the path an LDEV is using.
    I want to separate my path groups and check if the range of LDEV-id's are using the correct replication path.

    Search also in raidmanager (pairdisplay/pairvolchk/raidcom) but no info or option. Didn't look thoroughly in REST API, don't have a good overview yet with all command/parameters I can use there.

    Greetings,
    Marco Kom

     



    ------------------------------
    Kom Marco
    Service Administrator
    ING Bank N.V.
    ------------------------------



  • 4.  RE: PathID check with CLI or REST API

    Posted 02-23-2024 16:25
      |   view attached
     
    The attached PF-RestAPI demo writes LDEV info including LDEV path info
    to a log file in the logs sub-directory where the script resides. 
    There is also alot of other info written to
    the log; you need to scroll down a bit to get to the section with the LDEV info.
     
    Yes, the info in the log is in JSON format; but, let us know if this 
    is the info you are looking for.
    If so, I can show you how to reformat it into CSV.
     
    HOW-TO INFO --------------------------------------
     
    ( do all test and dev work in a safe non-critical environment )
     
    The notes below and the attached code may not be perfect ... do NOT cavalierly treat
    them like a fully regression-tested document / product .... they are for instructional purposes only
     
     
    [] Create a directory to store and test demo scripts
       c:\demos
     
       # note: annoying features of new Windows versions may
       # make it difficult for you to create directories ( outside of your profile )
       # I'll assume that you know how to deal with all of these silly msoft annoyances
     
    [] Copy the attached zip file to the  directory you created
     
    [] extract the contents of the zip file 
     
       You should end up with this directory:
     
       c:\demos\RestDemo
     
       In the RestDemo directory there should be:
         - several files
         - a logs sub-directory
     
    [] Run the CMD_Shell bat file 
       ( this opens a Windows shell prompt in the current directory )
     
     
    [] From the cmd shell prompt, run the script using python 3.x ( latest version )
     
       # note: annoying features of new Fisher-Price Windows versions may
       # make it difficult for you to run scripts ... 
       # I'll assume that you know how to deal with all of these silly msoft annoyances
     
     
       I have both python 2 and python 3 on my workstation, so I use the py launcher
       to specify python 3
     
       py -3 DpLdevMgr.py
     
       When run directly from the command line, the module's built-in test main
       function is called.
     
       I stripped all lines from the test main that modify array elements.
       Only the call to a function that lists DP LDEVs remains.
     
       Output is to a file in the logs directory.
     
       For nice reporting you will want to use the response_py element of the
       tuple returned by oDpLdevMgr.ListDpLdevs().  The data structure
       referenced by response_py is in python "format" ( ie. list of dictionaries ...etc. )
       and is easy to deal with.
     
     
    Andy


    ------------------------------
    Andrew J. Romero
    Storage Administrator
    Fermi National Accelerator Laboratory
    ------------------------------

    Attachment(s)

    zip
    RestDemo.zip   11 KB 1 version


  • 5.  RE: PathID check with CLI or REST API

    Posted 02-26-2024 07:29

    Andy,

    Nice solution, will definitely use you way of retrieving info. However, the path ID is not there in the information.
    See below the LDEV info (delete the empty lines) which I get for the two LDEV's. 

    LDEV  16384 (has pathgrp 1) and LDEV  16385 (has pathgrp 2).
    See the SN info:

    Greetings,
    Marco Kom

    LDEV Info:

      }, {
        "ldevId" : 16384,
        "virtualLdevId" : 16384,
        "clprId" : 0,
        "emulationType" : "OPEN-V-CVS",
        "byteFormatCapacity" : "2.00 G",
        "blockCapacity" : 4194304,
        "numOfPorts" : 1,
        "ports" : [ {
          "portId" : "CL1-B",
          "hostGroupNumber" : 3,
          "hostGroupName" : "TestGroup",
          "lun" : 3
        } ],
        "attributes" : [ "CVS", "HDP", "GAD", "DRS" ],
        "label" : "PATHGRPID-1",
        "status" : "NML",
        "mpBladeId" : 0,
        "ssid" : "0009",
        "poolId" : 1,
        "numOfUsedBlock" : 0,
        "isFullAllocationEnabled" : false,
        "resourceGroupId" : 2,
        "dataReductionStatus" : "ENABLED",
        "dataReductionMode" : "compression_deduplication",
        "dataReductionProcessMode" : "inline",
        "isAluaEnabled" : false,
        "isCompressionAccelerationEnabled" : true,
        "compressionAccelerationStatus" : "ENABLED"
      }, {
        "ldevId" : 16385,
        "virtualLdevId" : 16385,
        "clprId" : 0,
        "emulationType" : "OPEN-V-CVS",
        "byteFormatCapacity" : "2.00 G",
        "blockCapacity" : 4194304,
        "numOfPorts" : 1,
        "ports" : [ {
          "portId" : "CL1-B",
          "hostGroupNumber" : 3,
          "hostGroupName" : "TestGroup",
          "lun" : 4
        } ],
        "attributes" : [ "CVS", "HDP", "GAD", "DRS" ],
        "label" : "PATHGRPID-2",
        "status" : "NML",
        "mpBladeId" : 1,
        "ssid" : "0009",
        "poolId" : 1,
        "numOfUsedBlock" : 0,
        "isFullAllocationEnabled" : false,
        "resourceGroupId" : 2,
        "dataReductionStatus" : "ENABLED",
        "dataReductionMode" : "compression_deduplication",
        "dataReductionProcessMode" : "inline",
        "isAluaEnabled" : false,
        "isCompressionAccelerationEnabled" : true,
        "compressionAccelerationStatus" : "ENABLED"
      }, {



    ------------------------------
    Kom Marco
    Service Administrator
    ING Bank N.V.
    ------------------------------



  • 6.  RE: PathID check with CLI or REST API

    Posted 02-28-2024 04:33

    Did some extra testing and discover that Ops Center is looking to the dataflow what Pathgrp-id is set there.
    By default (automatically) it will show "-" and if you manually set the pathgrp-id in your DataFlow it shows you that pathgrp-id number for the replication .

    It doesn't tell you what the actual path is, like in SN.

    Still searching if I can find it somewhere (outside SN)

    Greeting,
    Marco



    ------------------------------
    Kom Marco
    Service Administrator
    ING Bank N.V.
    ------------------------------



  • 7.  RE: PathID check with CLI or REST API

    Posted 02-29-2024 11:13

    GET Remote Mirror Copy PAIRs

    RESPONSE :-

    {
        "data": [
            {
                "remoteReplicationId": "R8,51304,375,R8,51305,969",
                "muNumber": 2,
                "replicationType": "UR",
                "pvolLdevId": 375,
                "svolLdevId": 969,
                "fenceLevel": "ASYNC",
                "pvolJournalId": 10,
                "svolJournalId": 0,
                "pvolStatus": "PAIR",
                "consistencyGroupId": 17,
                "pvolStorageType": "R8",
                "pvolStorageSerial": "51304",
                "svolStorageType": "R8",
                "svolStorageSerial": "51305",
                "transitionStatus": "None",
                "pathGroupId": 0
            },
            {
                "remoteReplicationId": "R8,51304,378,R8,51305,765",
                "replicationType": "TC",
                "pvolLdevId": 378,
                "svolLdevId": 765,
                "fenceLevel": "DATA",
                "pvolStatus": "PAIR",
                "pvolStorageType": "R8",
                "pvolStorageSerial": "51304",
                "svolStorageType": "R8",
                "svolStorageSerial": "51305", 
                "copyPace": 3,
                "pathGroupId": 0
            },
            {
                "remoteReplicationId": "R8,51304,400,R8,51305,567",
                "muNumber": 0,
                "replicationType": "GAD",
                "pvolLdevId": 400,
                "svolLdevId": 567,
                "fenceLevel": "NEVER",
                "quorumDiskId": 4,
                "pvolStatus": "PAIR",
                "consistencyGroupId": 11,
                "pvolIOMode": "L/M",
                "pvolStorageType": "R8",
                "pvolStorageSerial": "51304",
                "svolStorageType": "R8",
                "svolStorageSerial": "51305",
                "copyPace": 7,
                "pathGroupId": 0
            }
        ]
    }



    ------------------------------
    Vinod Subramaniam
    Technical Expert: Center of Excellence
    Hitachi Vantara
    ------------------------------



  • 8.  RE: PathID check with CLI or REST API

    Posted 02-29-2024 11:44

    Here is the actual example API call.

    This will only work if you have registered raidcom device-groups and copy groups on the arrays.

    curl --location 'https://192.168.52.150:23451/ConfigurationManager/v1/objects/storages/900000060528/remote-mirror-copygroups?remoteStorageDeviceId=900000060814&detailInfoType=pair' \
    --header 'Authorization: Session 0dbc0ff2-78ac-4f27-bafc-b0901e1cd437' \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --header 'Remote-Authorization: Session 8bf766a0-6407-4086-8545-dc821bf9831d'



    ------------------------------
    Vinod Subramaniam
    Technical Expert: Center of Excellence
    Hitachi Vantara
    ------------------------------



  • 9.  RE: PathID check with CLI or REST API

    Posted 03-11-2024 05:12

    Tested last week and this one works perfectly. I got the info straight away without any adjustment.

    Thnx, Vinod for this answer.

    Regards, Marco



    ------------------------------
    Kom Marco
    Service Administrator
    ING Bank N.V.
    ------------------------------