Zanvetto1

updated

20 years ago

Z

Zanvetto1

22 Posts

0

5601

March 28th, 2007 12:00

List mapped devices to an FA but not masked to a host

Hi.
I want to know if there's any command that a user can issue from SYMCLI to get all the devices that are mapped to an FA but not masked to a Host.
Thank you.
  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    1114

    0

    Posted March 28th, 2007 13:00

    if you run this from the host:

    symcfg -sid 222 -dir 10d -p 0 list -address

    you will see this output
    Symmetrix ID: 000000000222
     
               Director                 Device Name          Attr     Address
        ---------------------- ----------------------------- ---- --------------
        Ident   Symbolic  Port Sym   Physical                     VBUS  TID  LUN
        ------  --------  ---- ----  -----------------------      ----  ---  ---
     
        FA-10D  10D       0    00DE  Not Visible             VCM     0   00  000
                               034D  Not Visible                     0   00  001
                               034E  Not Visible                     0   00  002
                               034F  Not Visible                     0   00  003
                               0350  Not Visible                     0   00  004
                               0351  Not Visible                     0   00  005
                               0352  Not Visible                     0   00  006
                               00EC  \\.\PHYSICALDRIVE31             0   00  0F7
                               00ED  \\.\PHYSICALDRIVE32             0   00  0F8
                               00EE  \\.\PHYSICALDRIVE33             0   00  0F9
    


    this way you can see all devices that are on that FA (you have to have Solutions enabler loaded on this host) and all devices that are actually masked to this host(they will actually show native device name, in this case it's a windows box)

    now if you need to get this information from a management host ..you will need to run the first command:

    symcfg -sid 222 -dir 10d -p 0 list -address

    but then you will need to run this command agains each device you see on the FA

    symmaskdb -sid 222 list assignmnet -dev 00EC

    this will show you either the WWN of the host its masked to, or this message:

    No device masking database records could be found for the specified input parameters

    Hopefully if you know how to write a little for loop in either perl or bash ..than you could simply loop thru those devices. Let me know if you need help with that.
  • Zanvetto1

    22 Posts

    1114

    0

    Posted March 28th, 2007 12:00

    from a management host but i want to know also the command from a specific host that is watching some devices.
    Thank you
  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    1114

    0

    Posted March 28th, 2007 12:00

    are you going to run this from a management host or the host in question ?
  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    1114

    0

    Posted March 28th, 2007 13:00

    sure thing ...what OS is running on the management host ?
  • Zanvetto1

    22 Posts

    1114

    0

    Posted March 28th, 2007 13:00

    They have Solaris and AIX.
    Thank you
  • Zanvetto1

    22 Posts

    1114

    0

    Posted March 28th, 2007 13:00

    Thank you so much for the answer
    I'm going to mark the question as answered but if you can help me with the bash scripts will be great.
  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    1116

    0

    Posted March 28th, 2007 17:00

    i am not a great scripter ..but this should accomplish what you are trying to do. I am sure your Unix guys can get much more sophisticated :). Copy and paste it into a file and save it with .sh extension. Run from the command line:

    # sh filename.sh


    #this script will look at specified FA port and check every device if it is masked
    #and display WWN of the host its masked to.
     
    echo ""
    echo " -- Local Syms --"
    echo ""
    echo "------------"
    symcfg list|grep Local|awk '{print $1}'
    echo "------------"
    echo ""
    echo "Select SID number from the list:"
    read SID
    echo "Input FA number: Example:10a "
    read FA
    echo "Input port number (0 or 1): "
    read PORT
     
    symcfg -sid $SID list >/dev/null 2>&1 
    if [ $? -eq 1 ]
        then
        echo "ERROR: you specified SID $SID - The Symmetrix ID is unknown ..exiting "
        exit
       fi
    HYPERS=`symcfg -sid $SID list -fa $FA -p $PORT -address|grep -v Sym|grep -v VCM|cut -c 28-31|grep -v '\---'`
     
    for i in $HYPERS
    do 
       echo "Checking device $i"
       symmaskdb -sid $SID -dev $i list assignment
    done
    
  • Zanvetto1

    22 Posts

    1116

    0

    Posted March 29th, 2007 05:00

    Wonderful.
    I'm going to send the scripts so they can try it.
    Thank you so much.
    Bye.
  • 1116

    0

    Posted April 28th, 2007 07:00

    symmaskdb -sid XXX -dir 3D -p 0 list no_assignements

    should provide you devices which are mapped to the FA but not masked to any host

    Hope this helps
  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    371

    0

    Posted April 28th, 2007 09:00

    did not know about this one ..thanks for sharing.