Network and Storage Protocols

CDOT 9.4 CIFS SHARES REPLICATION TO ANOTHER CDOT 9.4 WITHOUT SVMDR or PowerShell Scripts

Andrestorage
3,102 Views

Hello Folks , I´d like to know with has any kind of possibility to copy cifs shares and cifs permission to another ontap storage (9.4) ? I´dont what to work with SVMDR and PowerShell Scripts.. I remember in 7-mode, We just work with snapmirror souce > destination, break , copy commands of cifsconfig_share.cfg to new storage and DONE!

cifsconfig_share.cfg
: handles share configuration such as permissions and options
cifsconfig_setup.cfg: handles the basic cifs options such as security style
any idea how to do this in CDOT?  Man Happy

1 ACCEPTED SOLUTION

GidonMarcus
3,026 Views

Hi

 

You cannot do it in a file based. you can do it in the scripted way. or to orchestrate a text file with CLI's... in my case - i have all the shares pre-created on both clusters and a nightly script that validate their setting and permission to be equal.

 

#region connect
$Cdotcred = Import-Clixml -Path  "C:\edited\edited.xml"
$CdotClusters = 'clustername1','clustername2'
$ClustersSessions = Connect-NcController ($CdotClusters) -HTTPS -Credential $CdotCred -ErrorVariable gidiout
#endregion connect

#region Check that cifs shares matched between Prod and DR
$CifsSharesThatDontHaveExactMatchInDR = Get-NcCifsShare -Controller $CustersSessions | select Vserver,ShareName,
        @{Name='ShareProperties';Expression={$($_.ShareProperties | sort) -join ';'}}, 
        @{Name='Acl';Expression={$_.Acl -join ';'}} | Group-Object path,sharename,ACL,ShareProperties | ? count -lt 2 | select -ExpandProperty Group | sort ShareName   # Will only output issues 
#endregion Check that cifs shares matched between Prod and DR
Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK

View solution in original post

1 REPLY 1

GidonMarcus
3,027 Views

Hi

 

You cannot do it in a file based. you can do it in the scripted way. or to orchestrate a text file with CLI's... in my case - i have all the shares pre-created on both clusters and a nightly script that validate their setting and permission to be equal.

 

#region connect
$Cdotcred = Import-Clixml -Path  "C:\edited\edited.xml"
$CdotClusters = 'clustername1','clustername2'
$ClustersSessions = Connect-NcController ($CdotClusters) -HTTPS -Credential $CdotCred -ErrorVariable gidiout
#endregion connect

#region Check that cifs shares matched between Prod and DR
$CifsSharesThatDontHaveExactMatchInDR = Get-NcCifsShare -Controller $CustersSessions | select Vserver,ShareName,
        @{Name='ShareProperties';Expression={$($_.ShareProperties | sort) -join ';'}}, 
        @{Name='Acl';Expression={$_.Acl -join ';'}} | Group-Object path,sharename,ACL,ShareProperties | ? count -lt 2 | select -ExpandProperty Group | sort ShareName   # Will only output issues 
#endregion Check that cifs shares matched between Prod and DR
Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK
Public