Windows Server 2012: Implement Continuously Available File Shares

Increase the range of storage options for your mission-critical apps

Michael Otey

March 29, 2013

18 Min Read
Windows Server 2012: Implement Continuously Available File Shares

Continuously Available File Shares (CAFS) is an important new technology in Windows Server 2012. At its basic level, Server 2012's CAFS feature takes Windows file sharing capabilities and scales them using a Server 2012 cluster. CAFS takes advantage of new Server Message Block (SMB) 3.0 capabilities to increase the availability of Windows Server file shares used for document storage and application support. Some of the new SMB 3.0 features that enable CAFS include SMB Scale-Out, SMB Direct, and SMB Multichannel.

The CAFS feature addresses problems that occurred in earlier implementations of highly available file servers on Windows Server failover clusters. Previous implementations provided high availability for file shares but were hampered by brief periods of downtime and a momentary loss of connectivity in the event of a failover. Such brief outages were usually acceptable for Microsoft Office-type applications that perform frequent file opens and closes, because these apps could reconnect and save changes after the failover completed. However, these same outages weren't acceptable for applications like Hyper-V or SQL Server, which hold files open for extended periods of time, and outages would result in data loss. Before the advent of Server 2012, Microsoft didn't support these types of server installations on file shares. Providing application support was one of Microsoft's primary design points for CAFS. While you can use CAFS for simple client file sharing, CAFS is really targeted at supporting server applications. CAFS gives you the ability to take advantage of Windows Server's low-cost storage capabilities for mission-critical applications. CAFS provides continuous access to file shares with almost zero downtime.

Choose an Implementation

There are essentially two ways to implement CAFS:

  • General Purpose File Server—Very much like the highly available file server support in Windows Server 2008 R2, the CAFS general use file server implementation allows a file share to be supported on a failover cluster. CAFS improves the availability and performance of this implementation with the new higher performance SMB 3.0 client access.

  • Scale-Out File Server—The scale-out file server implementation is the new CAFS option for supporting applications like Hyper-V and SQL Server with no downtime. This implementation is limited to four servers.

You can see an overview of the CAFS architecture in Figure 1.

Figure 1: Overview of Continuously Available File Shares Architecture

One of the key technologies that enable CAFS is Server 2012's support for SMB Transparent Failover. SMB Transparent Failover lets file server services fail over to a backup node in the cluster so that applications with open files on the file server won't see an interruption in connectivity. CAFS addresses both planned maintenance and unplanned failures with zero application downtime.

Meet the Requirements

Because CAFS uses the SMB 3.0 features in Server 2012, the Server 2012 operating system is a definite requirement. CAFS is supported on both the Server 2012 Standard and Server 2012 Datacenter editions. CAFS is not supported on the Essentials or Foundation editions.

In addition, CAFS requires a Server 2012 failover cluster. This means you must have a minimum of a two-node Server 2012 cluster. Server 2012 failover clusters support a maximum of 64 nodes. You can find step-by-step instructions on setting a Server 2012 failover cluster in my article "Windows Server 2012: Building a Two-Node Failover Cluster." You also can watch a short video in which I describe the process of building a two-node Server 2012 Failover Cluster.

In addition to the cluster itself, the file server role must be installed on all cluster nodes. The clustered file server must be configured with one or more file shares that use the new continuously available setting. I provide more details about creating and configuring continuously available file shares later in this article.

For a two-node failover cluster, the cluster storage requires a minimum of two separate volumes (LUNs). One volume stores the shared files. This volume should be configured as a cluster shared volume (CSV). The other volume will function as the cluster witness disk. Most implementations use more volumes.

It's also recommended that you design your network so there are multiple pathways between nodes. This prevents the network from becoming a single point of failure. Using network adapter teaming and multiple switches and/or redundant routers can add resiliency to your network configuration.

Finally, the SMB client computers must be running Windows 8 client or Server 2012 to take advantage of the new SMB Transparent Failover capability.When an SMB 3.0 client connects to a CAFS, the SMB client notifies the witness service on the cluster. The cluster picks a node to be the witness for this SMB connection. The witness node is responsible for switching the client to the new host in the case of an interruption of service, without requiring the client to wait for TCP timeouts.

Create a General Purpose CAFS

To configure a CAFS, open the Failover Cluster Manager on any of the nodes in the cluster. Then click the Roles node in the navigation pane. This displays existing roles in the Roles pane, as shown in the center of Figure 2.

Figure 2: Failover Cluster Manager

The cluster can support multiple roles and provide high availability capabilities to all of them. Figure 2 shows an existing, highly available virtual machine (VM). To create a new general purpose CAFS, click the Configure Role link highlighted in the Actions pane. This starts the High Availability Wizard shown in Figure 3.

Figure 3: Adding the File Server Role

Scroll through the list of roles until you see the file server role. The file server role supports both the general purpose and scale-out application types of CAFS. Select File Server and then click Next to select the type of CAFS, which is displayed on the next screen, as Figure 4 shows.

Figure 4: Selecting the File Server Type to Create a General Purpose File Server

The File Server Type dialog box lets you choose between creating a File Server for general use or a Scale-Out File Server for application data. The general use option can be used for both Windows SMB-based file shares and NFS-based file shares. The general purpose CAFS also supports data deduplication, DFS replication, and data encryption. Click Next to continue creating the general purpose CAFS. This displays the Client Access Point dialog box that Figure 5 shows.

Figure 5: Client Access Point for General Purpose File Server

To create a new general purpose CAFS, you must provide a server name that clients will use when they access the CAFS. This name will be registered in your DNS, and clients will use it like a server name. In addition, the general purpose CAFS also needs an IP address. In Figure 5 I named the service CAFS-Gen (for general purpose CAFS) and gave it a static IP address of 192.168.100.177. Clicking Next lets you select the cluster storage for the CAFS.

The Select Storage dialog box that Figure 6 shows lets you select the storage for the general purpose CAFS. The storage must be available to the cluster. In other words, it must be listed under the cluster's storage node and designated as available storage. You cannot use preassigned CSVs for your general purpose CAFS.

Figure 6: The Select Storage Dialog Box

There are three disks that I could have used for this example, and I selected Cluster Disk 5 because I had previously allocated this storage to the CAFS (Figure 6). However, you can select any of the available cluster disks. Clicking Next displays the Confirmation screen. At this point you can either confirm your selections or go back through the High Availability Wizard dialog boxes and make changes. If everything is OK, clicking Next on the Confirmation screen displays the Configure High Availability dialog box, which shows the progress of the CAFS configuration process. When it's complete, a Summary screen is displayed. Clicking Finish on the Summary screen closes the High Availability Wizard and returns you to the Failover Cluster Manager.

After creating the CAFS role, the next step is to create a continuously available file share that uses that role. Figure 7 shows that the CAFS-Gen role is actively running and that it uses the file server role. To add a new continuously available file share, select the Add File Share link in the Actions pane that you see on the right side of Figure 7. This displays a Task Progress dialog box that shows the progress of retrieving server information. Upon completion, the New Share Wizard displays.

Figure 7: Adding a File Share

The New Share Wizard begins by asking what type of CAFS you want to create. You can choose to create either SMB or NFS types of CAFS. The SMB Share—Quick option creates a general purpose CAFS. The SMB Share—Applications option creates a highly available application share for applications like Hyper-V or SQL Server. I cover how to create a scale-out CAFS for applications later in this article. To create a general purpose CAFS, select the SMB Share—Quick option at the top of the list, as Figure 8 shows, and then click Next. The New Share Wizard displays the Share Location dialog box that Figure 9 shows.

Figure 8: Selecting a Profile for a General Purpose File Server
Figure 9: Share Location for General Purpose File Server

The name of the CAFS role is displayed in the Server Name box. Figure 9 shows the name of the CAFS-Gen role that I created earlier with a status of Online. You can select the location of the share using the options in the bottom half of the screen. In this example the G drive was selected by default (see Figure 9). If you want to use a different drive, you can manually enter the alternative path in the Type a custom path text box at the bottom of the screen. In this example I stuck with the default G drive and clicked Next to display the Share Name dialog box shown in Figure 10.

Figure 10: Share Name for General Purpose File Server

The Share Name dialog box lets you provide a name for the file share. For simplicity, I used the same name for the general purpose CAFS that I used for the service: CAFS-Gen, but that isn't necessary. You can name the share any valid SMB name. In the center of the screen you also can see the local and remote paths to the CAFS. The local path for this example is G:SharesCAFS-Gen. The share will be accessed by networked systems using the path \CAFS-genCAFS-Gen. Clicking Next displays the Configure share settings dialog box shown in Figure 11.

Figure 11: Configuring Share Settings for the General Purpose File Server

The Configure share settings dialog box lets you control how the share will be treated by the server. The Enable continuous availability check box is required to make the file share continuously available. This setting is checked by default. The Enable access-based enumeration setting controls whether users without permissions can view files and folders. This setting isn't checked by default. The Allow caching of share setting enables the contents of the share to be available to offline users via BranchCache. Finally, the Encrypt data access setting secures remote file access by encrypting the data transferred to and from the share. This setting is unchecked by default. Clicking Next displays the Permissions dialog box shown in Figure 12.

Figure 12: Specifying Permissions for the General Purpose File Server

By default, the CAFS is created with Full Control given to the Everyone group. You'll probably want to change this for most implementations. I accepted the default permissions in this example. Clicking Next displays the Confirmation dialog box where you can view a summary of the choices you made in the previous New Share Wizard dialog boxes. You can click Previous to go back and change any of the settings. Clicking Create on the Confirmation dialog box creates the CAFS and sets the permissions for the share. After the CAFS share has been created you can access it like any other file share. Figure 13 demonstrates how to access the share by entering the \cafs-genCAFS-Gen server and share name into Windows Explorer. At this point you can populate the share with documents or other types of files that would benefit from the availability of a CAFS.

Figure 13: Accessing the CAFS by Its Network Path

Create a Scale-Out CAFS

The primary purpose behind CAFS is to provide high availability to applications that store data on file shares. In the past, Microsoft didn't provide this kind of support for applications such as SQL Server that store their database on file shares. That changed with the release of Server 2012 and its support for the CAFS feature. Scale-out CAFS is implemented differently than general purpose CAFS. However, you use the same High Availability Wizard to create the scale-out option. To create a new CAFS for scale-out application support, select the Configure Role link in the Actions pane of the Failover Cluster Manager as demonstrated in Figure 2. Then on the Select Role dialog box, select the File Server role as shown in Figure 3. These first two steps are the same as for creating a general purpose CAFS. However, on the File Server Type dialog box, select the Scale-Out File Server for application data option as shown in Figure 14.

Figure 14: Selecting the File Server Type to Create a Scale-Out File Server

The scale-out file server option is designed for applications that leave their files open for extended periods of time. Clicking Next displays the Client Access Point dialog box shown in Figure 15. The Client Access Point dialog box lets you name the CAFS role. I christened the Scale-Out CAFS with the name CAFS-Apps (see Figure 15). This is the server name that client applications use when they access the share. Clicking Next displays the Confirmation screen, which lets you confirm your selections or go back through the High Availability Wizard dialog boxes and make changes. If everything is OK, click Next on the Confirmation screen to display the Configure High Availability dialog box, which shows the progress of the CAFS configuration process. When it's complete, a Summary screen is displayed. Clicking Finish on the Summary screen closes the High Availability Wizard and returns you to the Failover Cluster Manager.

Figure 15: Client Access Point for Scale-Out File Server

The next step is to add a file share to the CAFS scale-out application server. To create a new file share for the CAFS role, select the Add File Share link from the Actions pane, as I did for the general purpose file share in Figure 7. Clicking the Add File Share link for the scale-out CAFS starts the New Share Wizard shown in Figure 16.

Figure 16: Selecting Profile for Scale-Out File Server

To create a scale-out CAFS on the Select Profile dialog box, highlight the SMB Share—Applications option from the File share profile list and then click Next to display the Share Location dialog box shown in Figure 17. The Server box near the top of the dialog box lists two CAFS file servers that were previously created. To add the CAFS to the scale-out application file server, select the CAFS-APPS file server that shows Scale-Out File Server in the Cluster Role column. Then select the CSV on which you want the CAFS share created.

Figure 17: Share Location for Scale-Out File Server

This example has two existing CSVs. I selected C:ClusterStorageVolume1 as the location for the new scale-out CAFS. You also can enter a custom path to another CSV. After selecting the CSV, click Next to display the Share Name screen shown in Figure 18.

Figure 18: Share Name for Scale-Out File Server

The Share Name dialog box enables you to provide a name for the file share. I used the name HyperV-CAFS for the scale-out application CAFS (see Figure 18). In the center of the screen you also can see the local and remote paths to the CAFS. The local path for this example is C:ClusterStorageVolume1SharesHyperV-CAFS. The share will be accessed by networked systems using the path \cafs-appsHyperV-CAFS. Clicking Next displays the Configure share settings dialog box shown in Figure 19.

Figure 19: Configuring Share Settings for the Scale-Out File Server

When you create a scale-out CAFS, the Enable continuous availability setting is checked by default. In addition, the Enable access-based enumeration and Allow caching of share settings are disabled. You cannot select them. The only other optional setting that you can choose is the Encrypt data access setting. I kept the default settings (see Figure 19). Clicking Next displays the Specify permissions to control access dialog box shown in Figure 20.

Figure 20: Specifying Permissions for the Scale-Out File Server

Like the general purpose CAFS, the scale-out CAFS is created with Full Control given to the Everyone group, which you'll probably want to change. I accepted the default permissions and clicked Next, which displays the Confirmation dialog box where you can see a summary of the choices that you made in the previous New Share Wizard dialog boxes. You can click Previous to go back and change any of the settings. Clicking Create on the Confirmation dialog box creates the scale-out CAFS and sets its permissions. After the share is created, it can be accessed locally from C:ClusterStorageVolume1SharesHyperV-CAFS or remotely from \cafs-appsHyperV-CAFS. The new CAFS is visible in the CSV mount point (Figure 21). At this point you can populate the share with Hyper-V VMs, SQL Server data, and log files or other types of application data.

Figure 21: Accessing the CAFS Share Locally

Improve File Availability

In this article I demonstrate how you can make use of CAFS to add increased availability and flexibility to your IT infrastructure. CAFS provides improved availability for general purpose file shares and also enables server applications such as SQL Server and Hyper-V to store their data on highly available file shares, increasing the range of storage options for your mission-critical applications.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like