You may have noticed that in Windows Server 2008 that the “Share Subdirectories” option for file shares on a Failover Cluster has been removed…why would we do that?
First off, let’s take a stroll down memory lane and talk about the history of this feature and how it came to be…
Let’s timewarp back 10 years to the early clustering days. In Failover Clustering (or MSCS in those days) there are cluster resources. Resources control different things. In the case of File Shares, there was a “File Share” cluster resource which controlled creating the SMB share for the cluster node it was being created on. For each File Share, there needed to be a corresponding “File Share” resource… a 1:1 mapping where each one resource controlled one share.
This seemed fine, until someone wanted to create a huge, scaled up File Server with lots of shares (seemed reasonable). We then hit a problem, the cluster Resource Monitor architecture only supported up to 900 resources in a single cluster back in NT4. So in Windows NT 4.0 Service Pack 4 we did some improvements to support up to 1674 resources in a cluster. A great improvement, but still not enough to support the thousands of file shares that some customers needed. So we introduced the “Share Subdirectories” feature as a way to work around the problem. Basically, what it does is share one folder, and then all the subdirectories of that folder are automatically shared.
We limped along with this model, and it lasted for a solid decade. When it came time for Windows Server 2008, we decided we wanted to improve this, and fix it the right way. For starters, we re-wrote the Resource Monitor (ResMon) and replaced it with the super charged Resource Hosting Subsystem (RHS). With that we resolved all the limitations around the numbers of resources a cluster could host in Windows Server 2008 (yes, no limitations now). But before we declared victory, we wanted to put it to the test and do some serious scalability testing by creating tens of thousands of File Shares in a single cluster. As we did this, we realized it became very painful to manage tens of thousands of resources… so we started to rethink the entire design.
We realized that in the context of manageability, performance, scalability, and usability, a 1:many relationship was much better than a 1:1. In Win2008 replaced the legacy “File Share” resource, with the new “File Server” resource. When we did this redesign, we looked long and hard at the “Share Subdirectories” option and what value it provided. As I said before, it was originally a workaround to the limitations on the number of resources we could support in a cluster…which is now fixed in Windows Server 2008. In the new File Server resource model, we had a 1:many relationship. So it turns out that all of the reasons the “Share Subdirectories” existed were solved in better ways which resulted in greater efficiencies within the cluster itself. Note: We also did extensive performance optimizations in the new design, and MSIT has seen dramatic reductions in failover times… but that’s a story for another blog.
One central theme for Failover Clustering in Windows Server 2008 was to make clustering simple (“clustering for mere mortals”, as I like to call it), to remove all those “special” cluster considerations. For example, to create a File Share on a server normally you would open Windows Explorer, right-click and select Share. BUT WAIT! If you are on a cluster, something so simple wouldn’t work! You had to go open a certain tool (CluAdmin.exe) and do a special process to create all those File Share resources. At the end of the day, you couldn’t even trust a junior admin to do something as simple as setting up a file share on a Win2003 cluster. How silly…
We wanted to fix that. One of our major goals was to break down all those “special” considerations. We wanted to achieve parity with the core Windows operating system. The ‘mantra’ became – what you can do in a normal server… should be the same in a cluster, including the ways you do it. We did work to totally integrate clustering. No longer was it necessary to manually create resources. You could simply open Windows Explorer, use NET SHARE from the command line, programmatically call the NetShare() API’s, or use any 3rd party tool you like. The tool didn’t even have to be ‘cluster aware’, we handled all the logic under the covers. Now you don’t need to know or care if it’s a cluster, just create File Shares however you please or normally would. The Share Subdirectories option is not available on stand-alone servers. Our goal is to have parity and no special cluster considerations so it didn’t make sense to make shares on clusters behave differently.
The Share Subdirectories option also wasn’t very flexible because you had to build your directory structure in a special way… as only subdirectories under a root were shared. Once again, one more thing that required more special cluster considerations and planning. File servers needed special planning and design to get the features to work.
There were also security concerns. Share Subdirectories inherited the share level permissions of the root share, which meant that you couldn’t use share level permissions and had to depend on file system level permissions – not very flexible. It could also be viewed as a security risk. There was no other feature or option in Windows that doing something as simple as creating a folder would automatically share it and make its contents available on the network. Sharing a folder requires higher level permissions on the system, then creating a folder. This could allow unprivileged users to create shares on the network when you don’t want them to. Yet again, more considerations on why dealing with clusters in the past was hard, complex, and one has to be really careful.
With all of that in mind… we decided that Share Subdirectories had served its purpose, and it was time retire the functionality. So are you left high and dry? NOT AT ALL! There are many ways to still accomplish exactly what you had for the last 10 years…let’s discuss.
The new File Server resource is a 1:many relationship, much like the File Share resource with Share Subdirectories was (but it’s better). So let’s say you have a file server deployed today using the Share Subdirectories option to share out thousands of home directories for users. The one and only consideration is getting the thousands of file shares created the first time. Once they are created, they persist across failover.
There are several options for enabling a large numbers of shares:
NET SHARE the Subdirectories
If you have the directory structure setup using Share Subdirectories where you want to share all the folders that are subdirectories, then run the single line syntax below and it will share all folders in a directory path. Once they are created, no other actions are needed (you only need to run this single line syntax below ONCE).
How share a large number of child directories:
- Open cmd.exe and change to the directory where all sub directories are to be shared.
- Type the following:
for /d %d in (*.*) do Net Share %d=G:%d
Note: Be sure to change G: to the appropriate drive and path to share.
‘Migrate a Cluster’ Wizard
Use the ‘Migrate a Cluster’ Wizard built right into Windows Server 2008 Failover Clusters, to migrate the file shares from a Windows Server 2003 cluster to a new Windows Server 2008 Failover Cluster. The Migration wizard will handle creating the new File Server resource and all the shares. Here’s a step-by-step guide with more information:
File Share Migration Toolkit
Use the File Share Migration Toolkit. This is a tool for migrating file shares, and is completely cluster aware. Note: You need the 1.1 version which is currently in Beta for Windows Server 2008 support.
Once the shares are created, just do what you would normally do. Open Windows Explorer, script with NET SHARE, etc… Just use the exact same processes and procedures you use on stand-alone servers as there is absolutely no difference now in Windows Server 2008 Failover Clustering.
I hoped this sheds some light into why things were the way they were, why we made these decisions, and what your options are. Share Subdirectories served us well, and the feature will be missed. I know change is hard, but I sincerely believe that Windows Server 2008 Failover Clustering is the best highly available file server platform yet.
Principal Program Manager Lead
Windows Clustering & High Availability
Microsoft Enterprise Server Products