Start a Conversation

Unsolved

1 Rookie

 • 

9 Posts

1327

March 3rd, 2020 15:00

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?

1.2K Posts

March 13th, 2020 06:00

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

1.2K Posts

March 13th, 2020 06:00

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

No Events found!

Top