Topic
  • 11 replies
  • Latest Post - ‏2011-08-21T03:48:45Z by Theeraph
nitin patil
nitin patil
4 Posts

Pinned topic Changing WWPN of an virtual FC is allowed or not ?

‏2010-01-18T09:06:38Z |
I m using chsyscfg to change the WWPN of an Virtual FC as below , but gettin errors

chsyscfg -r prof -m 9117-MMA*XXXXXXX -i "name=Nomal1,lpar_id=6,virtual_fc_adapters="35/client/3/VIOSERVER-20/13/c0507602150e0016,c0507602150e0017/1""
An error occurred while changing the partition profile named Nomal1.
The value specified for the virtual_fc_adapters attribute is not formatted correctly.
The correct format is "virtual_fc_adapters=""<slot_num>/<adapter_type>/<remote_lpar_id>/<remote_lpar_name>/<remote_slot_num>/<wwpns>/<is_required>"",...".
Please correct the configuration data and retry the command.
But when i run the above command without the WWPNs , it runs fine .... and also adds a new pair of machine generated wwpn
i want to provide the wwpns manually , as it is already configured in the zoning

Can any one tell me wheter changing WWPN of an virtual FC is allowed or not ?
Updated on 2011-08-21T03:48:45Z at 2011-08-21T03:48:45Z by Theeraph
  • seroyer
    seroyer
    352 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2010-01-18T15:23:53Z  
    HMC/IVM command line requires input lists (like for -i) use CSV format. What you input is not quite correct CSV. Here is a definition of CSV: http://en.wikipedia.org/wiki/Comma-separated_values
    Here is a more formal definition, if you are into that: http://supercsv.sourceforge.net/csvSpecification.html

    In your case, though, you need to surround the virtual_fc_adapter=XX,XX part in double quotes, not the XX,XX part. And if your are running it from the shell, you may need to escape the interior double quotes.

    Example:
    -i "key1=a,key2=b,\"key3=c,d,e\""

    Steve
  • StephanieJ
    StephanieJ
    27 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2010-01-18T15:28:30Z  
    Yes, you can set the WWPNs of a virtual Fibre Channel adapter using the chsyscfg command.

    The data specified for the chsyscfg -i parameter must be in CSV (Comma Separated Values) format,
    which can sometimes be tricky, especially when the data itself includes a comma like the wwpns
    field does. According to the CSV standard, when the data contains a comma, it must be quoted,
    and quotes within the data must be doubled. Also, quotes must usually be escaped to get them
    through the shell. So, this should work:

    chsyscfg -r prof -m 9117-MMA*XXXXXXX -i "name=Nomal1,lpar_id=6,
    \"virtual_fc_adapters=\"\"35/client/3/VIOSERVER-20/13/c0507602150e0016,c0507602150e0017/1\"\"\""
  • seroyer
    seroyer
    352 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2010-01-18T18:37:49Z  
    Yes, you can set the WWPNs of a virtual Fibre Channel adapter using the chsyscfg command.

    The data specified for the chsyscfg -i parameter must be in CSV (Comma Separated Values) format,
    which can sometimes be tricky, especially when the data itself includes a comma like the wwpns
    field does. According to the CSV standard, when the data contains a comma, it must be quoted,
    and quotes within the data must be doubled. Also, quotes must usually be escaped to get them
    through the shell. So, this should work:

    chsyscfg -r prof -m 9117-MMA*XXXXXXX -i "name=Nomal1,lpar_id=6,
    \"virtual_fc_adapters=\"\"35/client/3/VIOSERVER-20/13/c0507602150e0016,c0507602150e0017/1\"\"\""
    Thanks Stephanie. I forgot that there is another layer of CSV in this case. To update my example:
    -i "key1=a,key2=b,\"key3=\"\"c1,c2\"\",\"\"d1,d2\"\"\""

    If you think about it logically, when you have multiple layers of CSV, start peeling away the layers:
    First layer is the shell, which strips the non-escaped double quotes, and the escape charaters
    key1=a,key2=b,"key3=""c1,c2"",""d1,d2"""

    Second layer is for the top level keys (strips outermost double quotes for each record, and strips doubled double quotes from within record):
    key1=a
    key2=b
    key3="c1,c2","d1,d2" (need double quotes around the subrecords because there are commas inside the subrecords)

    Third layer (list of values in key3):
    c1,c2
    d1,d2

    Fourth and final layer (for each record within the key3 layer, I'll only show the breakdown of the first record)
    c1
    c2
    Steve
  • dwitil
    dwitil
    2 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2010-01-19T06:53:09Z  
    Thanks everyone for this post
    I was also really in need for setting the wwpn , and this post helped me doing this
    I require this as while creating virtual FC, i Dynamically created the adapter & then re-created a new adapter in profile (as we did for virtual scsi). This created two set of wwpns for the same adapter .
    So there was a disaster waiting to happen on next activation of the profile
    This has saved me a lots of reconfiguration in the SAN side :)

    You can get more details in the post http://www.wmduszyk.com/?p=3482&langswitch_lang=en
  • dwitil
    dwitil
    2 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2010-01-19T06:59:26Z  
    • dwitil
    • ‏2010-01-19T06:53:09Z
    Thanks everyone for this post
    I was also really in need for setting the wwpn , and this post helped me doing this
    I require this as while creating virtual FC, i Dynamically created the adapter & then re-created a new adapter in profile (as we did for virtual scsi). This created two set of wwpns for the same adapter .
    So there was a disaster waiting to happen on next activation of the profile
    This has saved me a lots of reconfiguration in the SAN side :)

    You can get more details in the post http://www.wmduszyk.com/?p=3482&langswitch_lang=en
    Also i figured out tht , instead of escaping each double-quote with a back-slash we can use a single quote to enclose the whole data

    So the command will look like this

    chsyscfg -r prof -m 9117-MMA*XXXXXXX -i 'name=Nomal1,lpar_id=6,"virtual_fc_adapters=""35/client/3/VIOSERVER-20/13/c0507602150e0016,c0507602150e0017/1"""'
  • nitin patil
    nitin patil
    4 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2010-01-19T07:23:36Z  
    THANKSSS EVERYONEEE , i hv got wht i wanted
    Cheers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • nitin patil
    nitin patil
    4 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2010-01-19T07:27:40Z  
    We can chnge wwpn using chsyscfg
    eg:- chsyscfg -r prof -m 9117-MMA*XXXXXXX -i 'name=Nomal1,lpar_id=6,"virtual_fc_adapters=""35/client/3/VIOSERVER-20/13/c0507602150e0016,c0507602150e0017/1"""'
  • aix2arc
    aix2arc
    2 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2011-08-10T16:34:21Z  
    • seroyer
    • ‏2010-01-18T18:37:49Z
    Thanks Stephanie. I forgot that there is another layer of CSV in this case. To update my example:
    -i "key1=a,key2=b,\"key3=\"\"c1,c2\"\",\"\"d1,d2\"\"\""

    If you think about it logically, when you have multiple layers of CSV, start peeling away the layers:
    First layer is the shell, which strips the non-escaped double quotes, and the escape charaters
    key1=a,key2=b,"key3=""c1,c2"",""d1,d2"""

    Second layer is for the top level keys (strips outermost double quotes for each record, and strips doubled double quotes from within record):
    key1=a
    key2=b
    key3="c1,c2","d1,d2" (need double quotes around the subrecords because there are commas inside the subrecords)

    Third layer (list of values in key3):
    c1,c2
    d1,d2

    Fourth and final layer (for each record within the key3 layer, I'll only show the breakdown of the first record)
    c1
    c2
    Steve
    Hi Steve,

    I'm working on changing the WWPN on client LPAR of IVM, ran into syntax errors any input is appreciated.I tried all the option on the syntax mentioned below no lucks.

    $ chsyscfg -r prof -i name=LPAR2,"virtual_fc_adapters=""6/client/1/06-D558A/28/C0507602BDF10000/0,C0507602BDF10001/0"""
    VIOSE01040160-0022 Syntax of the configuration data is not valid. The correct syntax is "<attribute name 1>=<value>,<attribute name 2>=<value>,..." or ""<attribute name 1>=<value 1>,<value 2>,...>",..." . Depending on the shell used, any nested double quote characters may need to be preceded by an escape character, which is usually a '\\' character.
  • seroyer
    seroyer
    352 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2011-08-10T18:40:30Z  
    • aix2arc
    • ‏2011-08-10T16:34:21Z
    Hi Steve,

    I'm working on changing the WWPN on client LPAR of IVM, ran into syntax errors any input is appreciated.I tried all the option on the syntax mentioned below no lucks.

    $ chsyscfg -r prof -i name=LPAR2,"virtual_fc_adapters=""6/client/1/06-D558A/28/C0507602BDF10000/0,C0507602BDF10001/0"""
    VIOSE01040160-0022 Syntax of the configuration data is not valid. The correct syntax is "<attribute name 1>=<value>,<attribute name 2>=<value>,..." or ""<attribute name 1>=<value 1>,<value 2>,...>",..." . Depending on the shell used, any nested double quote characters may need to be preceded by an escape character, which is usually a '\\' character.
    You either need to use \ to escape the " or surround the parameter with '.

    Try this:
    $ chsyscfg -r prof -i 'name=LPAR2,"virtual_fc_adapters=""6/client/1/06-D558A/28/C0507602BDF10000,C0507602BDF10001/0"""'

    Unfortunately, I don't have a system handy to try it.

    Steve
  • aix2arc
    aix2arc
    2 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2011-08-16T14:13:17Z  
    • seroyer
    • ‏2011-08-10T18:40:30Z
    You either need to use \ to escape the " or surround the parameter with '.

    Try this:
    $ chsyscfg -r prof -i 'name=LPAR2,"virtual_fc_adapters=""6/client/1/06-D558A/28/C0507602BDF10000,C0507602BDF10001/0"""'

    Unfortunately, I don't have a system handy to try it.

    Steve
    Yes that helped,Thanks a lot Steve.
  • Theeraph
    Theeraph
    21 Posts

    Re: Changing WWPN of an virtual FC is allowed or not ?

    ‏2011-08-21T03:48:45Z  
    • dwitil
    • ‏2010-01-19T06:53:09Z
    Thanks everyone for this post
    I was also really in need for setting the wwpn , and this post helped me doing this
    I require this as while creating virtual FC, i Dynamically created the adapter & then re-created a new adapter in profile (as we did for virtual scsi). This created two set of wwpns for the same adapter .
    So there was a disaster waiting to happen on next activation of the profile
    This has saved me a lots of reconfiguration in the SAN side :)

    You can get more details in the post http://www.wmduszyk.com/?p=3482&langswitch_lang=en
    Hi,

    ! I was also really in need for setting the wwpn , and this post helped me doing this. I require this as while creating virtual FC, i Dynamically created the adapter & then re-created a new adapter in profile (as we did for virtual scsi). This created two set of wwpns for the same adapter .

    1. I do not think changing WWPN is a good idea, because the generated ones from HMC are surely unique...

    2. I think you should do this instead.

    Are you aware that after you DLPARed making changes to the configuration of the partition profile, you can save this 'current' configuration to a new partition profile?

    Doing this way, the WWPN in the partition profile will be the same (since it is the same adapter, but when you add a new vFC adapter to the partition profile, that is a new one!).

    Hope this helps,
    Theeraphong