NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Network and Storage Protocols

CIFS SHARES

Rpstorage
8,344 Views

Hi,

 

I have 1000 cifs shares on production filer1. Now I need to create these 1000 shares on DR filer. We have same volume names in DR Filer. Is there anyway to get this done with a script or easy way?

Thanks,

 

 

7 REPLIES 7

aborzenkov
8,329 Views
Do you use 7-Mode or C-Mode.

Rpstorage
8,326 Views

7-mode

scottgelb
8,319 Views

You could copy config_share.cfg and edit it for the target... then with cifs terminated, copy the file (nfs, ndmp, or non-cifs method) to the target, then cifs restart.

 

For cDOT (not this case), there is a really good script Justin posted http://www.datacenterdude.com/storage/backup-restore-cifs-shares-netapp-clustered-data-ontap-powershell/

Rpstorage
8,313 Views

I can not terminate the cifs since users are accessing shares.

aborzenkov
8,312 Views
Scott beat me, but note that it may be confused by local users that won't be present on DR filer. So replicating configuration is more involved. You may look at vfiler DR which relocates complete filer with all configuration.

scottgelb
8,308 Views

You could take the content of cifsshare_config.cfg and use it to create a command line script to create the shares you want... enter the lines on the target after edits if needed.

 

One point to note...when cifsconfig_share.cfg is parsed at cifs startup, it takes the cifs access as listed.  When you enter a cifs shares command to create a share at the command line, it automatically adds "EVERYONE / FULL CONTROL".. so if you don't want that or it isn't on the source, then you need to cifs access to delete everyone after you create the share from the cli.

Rpstorage
8,307 Views

I am not using vfiler 🙂 I want a script which can grap the shares from filer1 and create same shares in DR filer with ACL.

Public