2 Replies Latest reply: Aug 4, 2016 12:49 AM by Jeroen ten Have RSS

    Connect FC initiatorgroup to volume with powershell toolkit

    Jeroen ten Have Newbie
    Visibility: Open to anyone

      Hello,

       

      For DR- testing purposes i'm creating a script that will create clones of the latest snapshots that are replicated to our DR site.

      After that i need to set the access on the volumes so VMware can access the clones.

      On exisiting volumes I'll see the access_control_records filled up when i'm doing a Get-NSvolume - name <VOLUMENAME> | select *

       

      But is there a way how to set this with Set-NSvolume or Set-NSinitiator group from the powershell toolkit?

       

      Tnx for helping.

        • Re: Connect FC initiatorgroup to volume with powershell toolkit
          Julian Cates Adventurer

          Hi Jeroen,

           

          The command you need is New-NSAccessControlRecord.  This cmdlet lets you assign an ACR to a volume.  Here's the usage:

           

          PS C:\Users\jcates> get-help New-NSAccessControlRecord

           

          NAME

              New-NSAccessControlRecord

           

          SYNOPSIS

              Add an access control record to the specified volume.

           

          SYNTAX

              New-NSAccessControlRecord [[-apply_to] [<String>]] [[-chap_user_id] [<String>]] [[-initiator_group_id] [<String>]] [[-lun] [<UInt64>]] [-vol_id] <String> [<CommonParameters>]

           

          DESCRIPTION

              Add an access control record to the specified volume.

           

          RELATED LINKS

           

           

          REMARKS

              To see the examples, type: "get-help New-NSAccessControlRecord -examples".

              For more information, type: "get-help New-NSAccessControlRecord -detailed".

              For technical information, type: "get-help New-NSAccessControlRecord -full".

           

          PS C:\Users\jcates> get-help New-NSAccessControlRecord -examples

           

          NAME

              New-NSAccessControlRecord

           

          SYNOPSIS

              Add an access control record to the specified volume.

           

              -------------------------- EXAMPLE 1 --------------------------

           

              PS C:\>New-NSAccessControlRecord -vol_id 06477237f04e33a565000000000000000000000143 -initiator_group_id 02477237f04e33a56500000000000000000000000e

           

              access_protocol      : iscsi

              apply_to             : both

              chap_user_id         :

              chap_user_name       : *

              creation_time        : 4/26/2016 2:53:28 AM

              id                   : 0d477237f04e33a565000000000000000000000111

              initiator_group_id   : 02477237f04e33a56500000000000000000000000e

              initiator_group_name : IG1

              last_modified        : 4/26/2016 2:53:28 AM

              lun                  : 0

              pe_id                :

              pe_lun               :

              pe_name              :

              snap_id              :

              snap_name            :

              snapluns             :

              vol_id               : 06477237f04e33a565000000000000000000000143

              vol_name             : siva-vss

           

           

              Creates a new access control record for volume id 06477237f04e33a565000000000000000000000143 with initiator_group_id 02477237f04e33a56500000000000000000000000e

           

           

              -------------------------- EXAMPLE 2 --------------------------

           

           

              PS C:\>New-NSAccessControlRecord -vol_id 06477237f04e33a565000000000000000000000143 -initiator_group_id 02477237f04e33a56500000000000000000000000e -apply_to "both"

           

              access_protocol      : iscsi

              apply_to             : both

              chap_user_id         :

              chap_user_name       : *

              creation_time        : 4/26/2016 2:53:28 AM

              id                   : 0d477237f04e33a565000000000000000000000111

              initiator_group_id   : 02477237f04e33a56500000000000000000000000e

              initiator_group_name : IG1

              last_modified        : 4/26/2016 2:53:28 AM

              lun                  : 0

              pe_id                :

              pe_lun               :

              pe_name              :

              snap_id              :

              snap_name            :

              snapluns             :

              vol_id               : 06477237f04e33a565000000000000000000000143

              vol_name             : siva-vss

           

              Creates a new access control record for voume id 06477237f04e33a565000000000000000000000143 with initiator_group_id 02477237f04e33a56500000000000000000000000e

           

           

          Cheers!

           

          Julian