UNSOLVED

KeystoneCruiser

updated

16 years ago

0

1491

February 17th, 2011 10:00

Using symmask for multiple devices to multiple wwpns

I am trying to use symmask to mask multiple devices to 30 wwpns that reside on 2 FA sets 4aa/13aa, 4bb/13bb.

I'm new to SE so my commands are pretty basic and am having a difficult time masking to multiple wwns, FAs and devices.  I could do this one line at a time but was hoping someone has a shortcut they could share.

This is what I normally use:

$ symmask add devs 12EO -wwn XXXXXXXXXXXXXXXX -dir 4a -p 0 -sid XXXX
$ symmask refresh -sid XXXX

Thanks

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    811

    0

    Posted February 17th, 2011 13:00

    i don't think you can get away from specifying each FA and WWN but you can put devices in a device group or a file and mask it that way, for example:

    symmask -sid 123 -wwn 1111111111111111 -dir 7a -p 0 add -g -nop

    or

    symmask -sid 123 -wwn 1111111111111111-dir 7a-p 0 add -f yourdevices.txt -nop

    where device file looks like this:

    0BAD 0

    002F 0

    1361 0

  • rworkman1

    26 Posts

    811

    0

    Posted February 23rd, 2011 05:00

    What kind of system (O/S) are you planning to run the command on?

    For example in shell programming on UNIX systems a simple loop would work.  Be happy to put up something if that's what your working with.

    Regards,

    Rita

  • 811

    0

    Posted February 23rd, 2011 07:00

    @dynamox - thanks those commands worked well

    @rworkman - I primarily use windows, but have an AIX server with ksh that I issue commands from.

  • rworkman1

    26 Posts

    811

    0

    Posted February 23rd, 2011 09:00

    For UNIX:

    Create a file that as the sym disk numbers (at least 4 digist, so A7 would be 00A7)

    I add the sid/array as a variable, because I work in shops that have lots of arrays sometimes.

    Edit the script below for sid#,wwn,director & port

      You'll need to edit this for each wwn;dir & port and run it again

      The output will all go into one file that can then be run, once for all.

    ======================

    #!/bin/ksh

    #

    # Edit the following variables:

    #

    ARRAY="1234"

    WWN="1234567890123"

    DIR="13"

    PORT="0"

    for a in `cat /dir/file-with-sym-disk-numbers`

    do

    echo "symmask -sid $ARRAY -wwn $WWN -dir $DIR -p $PORT add $a -nop >> /dir/masking-file.lis

    done

    =====================

    The single quote after "for a in..." is the left single quote, left side of "1" on top of keyboard.

    Each time you run it with the new port/wwn, etc it will append to the file.

    Once you create the file, make is executable and run it.

    Regards,

    Rita

  • rworkman1

    26 Posts

    811

    0

    Posted February 23rd, 2011 09:00

    Ouch..sorry...typo..

    There should be a closing parenthesis " at the end of the echo statement

    /rcw

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    811

    0

    Posted February 23rd, 2011 10:00

    while this definitely works, looping through every single device is so inefficient, i would rather have all devices in a file and just loop through the list of WWNs.

  • rawstorage

    4 Apprentice

    •

    423 Posts

    811

    0

    Posted February 24th, 2011 01:00

    Guys,

    I know that this is already answered but thought I would kick in my 2 cents here,   There are a couple of shortcuts to this.

    First off if you haven't tried the masking wizard from Symmetrix management console it really is the business, not just for VMAX for DMX too, just a few clicks and you're done here.  The wizard will actually do the mapping too for you if the devices aren't already mapped. Worth looking at if you are not already using it.

    Another shortcut for this from the command line would be to set up host aliases..  There is a little bit of setup to this first time you do it but the result is worth the effort.

    Once you have set these up with the commands below  alias is separated by / to form Node Name followed by Port Name

    symmask ‑sid1234 -wwn 10000000c998901e rename -alias ORACLERAC_PROD/hba1

    symmask -sid 1234 -wwn 10000000c998901f rename -alias ORACLERAC_PROD/hba2

    you can then just mask using the command below..  If you have an alias setup for Node with 30 Alias then you can do it all in a few commands.

    symmask ‑sid 1234 ‑host ORACLERAC_PROD ‑dir 14 -p 0 add devs 1ea:11ef,1f4

    symmask -sid 1234 refresh

    Hope this helps.

  • rworkman1

    26 Posts

    811

    0

    Posted February 24th, 2011 04:00

    Dynamox-the loop creates a single file with everything, so the completed file only needs to be run 1x.

    I think the great thing is, there are now multiple solutions to the same question.  Now it's just a simple matter of pick what works best for you.

    I love variety!

    Rgrds,

    Rita

  • rawstorage

    4 Apprentice

    •

    423 Posts

    458

    0

    Posted February 24th, 2011 04:00

    The spice of life ☺

  • SKT2

    2 Intern

    •

    1340 Posts

    445

    0

    Posted March 26th, 2011 19:00

    "The wizard will actually do the mapping too for you if the devices aren't already mapped. Worth looking at if you are not already using it.".. DMX traditionally has to go through both mapping and masking. Are you saying by using SMC  the wizard will take care of mapping as well as masking together? So by using SMC the provisioning on both DMX and VMAX happens similarly(not much diff)? can there be masking view concept for DMAX when SMC is used?