Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Migrate" shares to cluster by scripting

Status
Not open for further replies.

ENRG

IS-IT--Management
Aug 14, 2001
8
0
0
NO
We have 250 file shares on a fileserver, which is now clustered. But to get these to fail over with the server, they have to be defined in clusteradmin. I've read a MS KB about this with the aid of cluster.exe, but the terms used were a bit vague, so I was wondering if anybody had any experience with this? A sample script would be helpful.

Also, our users have their homedrives on this server, where the share name equals the directory name (for example the directory name "ronb" is shared as "ronb$"). Is there a way to script this also to "migrate" there shares to the cluster aswell, so we don't have to enter each username in the script? A for loop maybe? How?
 
Regarding shares on a 2003 cluster, you may want to follow this as there is a limitation to the number of cluster resources (you will tend to hit that limitation if creating a resource for each share). In hind-site, when you migrate share data to a cluster, copy the shares to a folder such as D:\Data. Create one shared resource within the cluster for the Data directory. From the properties of the Data share, go to the Parameters tab, click the Advanced button. Under the Advanced File Share Properties choose the "Share subdirectories" radio button. Viola, all the subs (your migrated shares) are automatically shared via the cluster service. Much easier to manage one resource within the cluster.
Couple of things you need to know when sharing subdirectories:
1. Local Admin must have full access to the share, yes local - It will change during failover from Node1\Administrator to Node2\Administrator.
2. You can only have one share name per directory. If you create a second share name on the same directory, the second share name becomes unshared during a cluster fail-over.

There are scripts for migrating shares, I have always found robocopy as the best utility for the job, so far...

Jesse Hamrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top