Highlighted
2 Bronze

Batch create SMB shares

Looking to see if there is a way to automatically make local CIFS shares. When we did windows server migrations for data, we had a script/batch file which we could run to create local shares after the data was copied over. Basically, there is a top level folder usually called something like "Data", and within that top folder, there are the subfolders for which we would create the shares. Examples of subfolder names would be Finance, HR, Software, etc. Basically we would run the script against the Data folder and it would read the names of each subfolder and create a local share with the same name but with an "$" appended to the local share name to make it hidden. So it would create local shares Finance$, HR$, Software$ and so forth, and also set the share permissions to change permissions for Authenticated Users. This batch file does not work on the Isilon since we usually run it locally on the destination Windows file server and requires windows WMI. Is there a way to automatically create local CIFS shares on the Isilon similar to this method?
0 Kudos
2 Replies
Highlighted
4 Beryllium

Re: Batch create SMB shares

Customer scripts can be executed on an Isilon cluster from any node: language would be bash or zsh, so a seasoned Linux programmer or admin could help out.

hth

-- Peter

0 Kudos
Highlighted
4 Beryllium

Re: Batch create SMB shares

As a starting point (do not use as-is!):

 

for share in Finance HR Software

do

       isi smb shares create "$share$" "/ifs/data/$share"

done

0 Kudos