> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up a distributed file system

> Make ABBYY FlexiCapture Processing Server file storage fail-safe with DFS Namespaces and DFS Replication, covering roles, shared folders, and namespaces.

When installed on a cluster, the Processing Server uses file storage to store temporary files. If the file storage fails, the entire cluster will go down. To ensure continuous operation of the cluster, you need to make your file storage fail-safe.

<Warning>
  For the [file storage](/flexi-capture/admin-guide/architecture-ag) that will store document images and captured data, you need to use hardware solutions (for example, RAID disks). Software-based distributed storage solutions are not supported.
</Warning>

This topic describes one possible implementation of fail-safe file storage using DFS Namespaces and DFS Replication. DFS Namespaces creates a virtual directory of multiple folders located on different servers, which will remain accessible even if one of the servers fails. DFS Replication automatically tracks changes in the `ServerSettings.xml` files and replicates them in a backup folder.

<Note>
  In the following instructions, a computer named `DCsrv` is used as the host server, but you can use any computer where the DFS roles are set up.
</Note>

Before you begin, you will need:

* A computer running Windows Server 2012 or later that is not used as a cluster node or for file storage
* The DFS Namespaces and DFS Replication roles set up on that computer
* The DFS Namespaces and DFS Replication roles set up on all of the nodes
* A shared folder, with full control permissions for the `node1admin` and `node2admin` users, that serves as a backup when the main shared folder becomes inaccessible

To set up a distributed file system, complete the following steps:

1. [Add the DFS roles](#dfs-roles).
2. [Create shared folders](#dfs-file-share).
3. [Create a namespace](#dfs-namespace).
4. [Add the shared folders to the namespace](#dfs-adding-file-shares-to-namaspace).
5. [Set up replication](#dfs-replication).
6. [Set up priorities for the folder targets](#dfs-priority).
7. [Configure the ABBYY FlexiCapture Processing Server service](#dfs-setting-fcprocessingserver).

## <a id="dfs-roles" />Add the DFS roles

1. Open **Server Manager** and click **Add Roles and Features**.
2. At the **Select server roles** stage, expand **File and Storage Services** and select **DFS Namespaces** and **DFS Replication**.

<Frame>
  <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/Add_Roles_and_Features_Wizard.png?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=dd1199bd57fe1490c61f3cd7d84916a9" alt="Screenshot of the Add Roles and Features Wizard at the Select server roles stage, with DFS Namespaces and DFS Replication selected under File and Storage Services." width="786" height="560" data-path="images/flexi-capture/Add_Roles_and_Features_Wizard.png" />
</Frame>

## <a id="dfs-file-share" />Create shared folders

The shared folder must:

* Be used only to replicate data from the cluster.
* Not be located on a cluster node or in the file storage.
* Be accessible to all nodes.

To create the shared folder, open **Server Manager**, click **File and Storage Services → Shares**, and then click **Tasks → New Share...**. Next, complete steps 2 through 14 described in [Create a shared folder for the Processing Server service](/flexi-capture/admin-guide/fail-safety-proc#network-folder).

## <a id="dfs-namespace" />Create a namespace

Namespaces are created and configured in the **DFS Management** console, where you select a server, grant access permissions to users, and specify the namespace type.

1. Open **Server Manager** and click **Tools → DFS Management**. In the DFS Management snap-in that opens, click **New Namespace...**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS1.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=3f52d9ae99266252121871343daf4544" alt="Screenshot of the DFS Management console with Namespaces selected and the New Namespace command available in the Actions pane." width="935" height="708" data-path="images/flexi-capture/DFS1.png" />
   </Frame>

2. Specify the name of the server that will host the namespace and click **Next**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS2.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=35e654f0f54da24a59316ade02289c44" alt="Screenshot of the Namespace Server step of the New Namespace Wizard with DCsrv entered as the server that will host the namespace." width="714" height="574" data-path="images/flexi-capture/DFS2.png" />
   </Frame>

3. Specify a name for the namespace and click **Edit Settings...**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS3.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=05f58936333aa5a2eb6941783099c1c1" alt="Screenshot of the Namespace Name and Settings step of the New Namespace Wizard with DFS entered as the namespace name and the Edit Settings button available." width="714" height="574" data-path="images/flexi-capture/DFS3.png" />
   </Frame>

4. In the **Edit Settings** dialog box, select the **Use custom permissions** option and click **Customize...**. Next, grant full control permissions for the shared folder to the `node1admin` and `node2admin` users.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS15.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=44bbea4d9e8f537c8a777fd3a5243493" alt="Screenshot of the Edit Settings dialog box for the DFS namespace shared folder with the Use custom permissions option selected and the Customize button available." width="390" height="489" data-path="images/flexi-capture/DFS15.png" />
   </Frame>

5. At the **Namespace Type** stage, select **Domain-based namespace**, and then select the **Enable Windows Server 2008 mode** option and click **Next**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS17.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=590850891666e6fc60231b051478b66b" alt="Screenshot of the Namespace Type step of the New Namespace Wizard with Domain-based namespace selected and the Enable Windows Server 2008 mode option checked." width="714" height="574" data-path="images/flexi-capture/DFS17.png" />
   </Frame>

6. Check to make sure that the specified settings are correct and click **Create**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS18.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=300ef2a1857b953fb3a80401e467461d" alt="Screenshot of the Review Settings and Create Namespace step of the New Namespace Wizard summarizing the domain-based namespace settings before creation." width="714" height="574" data-path="images/flexi-capture/DFS18.png" />
   </Frame>

7. Click **Close** to close the wizard.

<Frame>
  <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS19.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=14f935da356ccbe0eff56c3d44bb2e55" alt="Screenshot of the Confirmation step of the New Namespace Wizard reporting that the Create namespace task completed with a Success status." width="714" height="574" data-path="images/flexi-capture/DFS19.png" />
</Frame>

## <a id="dfs-adding-file-shares-to-namaspace" />Add the shared folders to the namespace

Add the main and backup shared folders to the namespace:

1. In the DFS Management snap-in, click **New Folder...**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS47.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=5b07fb1da2328d23a4c9c9a45e2c7ad8" alt="Screenshot of the DFS Management console showing the cluster2016.com DFS namespace with the New Folder command highlighted in the Actions pane." width="2479" height="1780" data-path="images/flexi-capture/DFS47.png" />
   </Frame>

2. In the dialog box that opens, specify a name for the folder, and then click **Add...**. The name will be displayed in the namespace of the distributed file system.

<Note>
  The name you provide for the shared folder must not be the same as the name of any replicated folders.
</Note>

<Frame>
  <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS20.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=a7942043a2c143a5386b59cc8d50c744" alt="Screenshot of the New Folder dialog box with FC12ClusterTemp entered as the folder name and an empty Folder targets list with the Add button available." width="394" height="416" data-path="images/flexi-capture/DFS20.png" />
</Frame>

3. Specify the path to the shared folder and click **OK**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS13.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=69e103485f71e81b4c8195b00352e221" alt="Screenshot of the Add Folder Target dialog box with the path to the shared folder target entered in the Path to folder target field." width="394" height="168" data-path="images/flexi-capture/DFS13.png" />
   </Frame>

4. Click **Add...** again and specify the path to the backup folder. Both folder targets appear in the **Folder targets** list. When you are done, click **OK**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS24.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=e07edf3aa7d90c11b70940ec0095b982" alt="Screenshot of the New Folder dialog box with the main and backup shared folder paths listed in the Folder targets list." width="394" height="416" data-path="images/flexi-capture/DFS24.png" />
   </Frame>

5. A message will appear saying that you can create a replication group. Click **Yes** to create a replication group and start setting up replication.

<Frame>
  <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS25.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=b8693d61ca37b5e3783daf2d8fcd88d4" alt="Screenshot of the Replication message box asking whether to create a replication group to synchronize the folder targets, with Yes and No buttons." width="483" height="193" data-path="images/flexi-capture/DFS25.png" />
</Frame>

## <a id="dfs-replication" />Set up replication

Setting up replication means creating a replication group, specifying a server, selecting a topology of connections among group members, choosing a replication schedule, and specifying replication bandwidth. You configure all of this in the **Replicate Folder Wizard**:

1. The wizard will suggest the names of the replication group and replicated folder. Edit these names if necessary or keep the default names and click **Next**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS26.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=59b6e24f260f907f726e2b2c082662a6" alt="Screenshot of the Replication Group and Replicated Folder Name step of the Replicate Folder Wizard with suggested names for the replication group and the FC12ClusterTemp replicated folder." width="714" height="574" data-path="images/flexi-capture/DFS26.png" />
   </Frame>

2. The wizard will inform you if the folder targets can participate in replication. Review the information in the **Eligibility** column and click **Next**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS27.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=4b133a62277252b2776911ea3a124d2b" alt="Screenshot of the Replication Eligibility step of the Replicate Folder Wizard showing both folder targets marked Add as DFS Replication member in the Eligibility column." width="714" height="574" data-path="images/flexi-capture/DFS27.png" />
   </Frame>

3. Select the server that contains the data to be replicated to folder targets and click **Next**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS28.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=ddee4dd605929e38f3bffee9f1b80590" alt="Screenshot of the Primary Member step of the Replicate Folder Wizard with FC12ProcServer selected as the primary member that holds the content to be replicated." width="714" height="574" data-path="images/flexi-capture/DFS28.png" />
   </Frame>

4. For the topology to be used, select **Full mesh** and click **Next**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS29.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=6f7667458586d18d5d7cdceb5b4dbec7" alt="Screenshot of the Topology Selection step of the Replicate Folder Wizard with the Full mesh topology option selected." width="714" height="574" data-path="images/flexi-capture/DFS29.png" />
   </Frame>

5. For the replication schedule, select **Replicate continuously using the specified bandwidth**. From the **Bandwidth** drop-down list, select **Full** and click **Next**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS30.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=b3b75371f0c84f23badfc62faa9a7593" alt="Screenshot of the Replication Group Schedule and Bandwidth step of the Replicate Folder Wizard with Replicate continuously using the specified bandwidth selected and Bandwidth set to Full." width="714" height="574" data-path="images/flexi-capture/DFS30.png" />
   </Frame>

6. Check to make sure that the specified settings are correct and click **Create**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS31.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=ab2c23e92c7951c390110bf17d3082d0" alt="Screenshot of the Review Settings and Create Replication Group step of the Replicate Folder Wizard summarizing the replication group folder, members, and primary folder target before creation." width="714" height="574" data-path="images/flexi-capture/DFS31.png" />
   </Frame>

7. Once the replication group is created, click **Close** to close the wizard.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS32.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=b5b91f5d1a5e734f31098a0861dd1430" alt="Screenshot of the Confirmation step of the Replicate Folder Wizard reporting that all replication group creation tasks completed with a Success status." width="714" height="574" data-path="images/flexi-capture/DFS32.png" />
   </Frame>

8. If a **Replication Delay** warning appears, click **OK**.

<Frame>
  <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS7.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=11e5da68e30f66a8fe5cae3f035a7acc" alt="Screenshot of the Replication Delay information message warning that replication will not begin until the configuration is picked up by the replication group members." width="470" height="158" data-path="images/flexi-capture/DFS7.png" />
</Frame>

After you have set up replication, we recommend testing it to make sure that it works correctly. To do this, open the **DFS Management** snap-in, select the newly created replication group, and click **Create Diagnostic Report**:

<Frame>
  <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS8.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=0a6f46fee3bd92f6f59871454795be4a" alt="Screenshot of the DFS Management console with the FC12ClusterTemp replicated folder memberships selected and the Create Diagnostic Report command highlighted in the Actions pane." width="986" height="708" data-path="images/flexi-capture/DFS8.png" />
</Frame>

In the **Diagnostic Report Wizard** that opens, select the **Propagation test** option and follow the instructions of the wizard (we recommend keeping the default settings).

Once the diagnostic is complete, the **Diagnostic Report Wizard** will display a diagnostic report.

## <a id="dfs-priority" />Set up priorities for the folder targets

To minimize the risk of malfunction, we recommend setting up priorities for the folder targets.

<Note>
  This is one possible priority setup for the folder targets. Other setups are possible, depending on your needs. For detailed instructions on setting up target priorities, see [this page on the Microsoft website](https://docs.microsoft.com/en-us/windows-server/storage/dfs-namespaces/set-target-priority-to-override-referral-ordering).
</Note>

1. Open your namespace and then open the properties of the shared folder.

   <Frame>
     <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS48.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=756f2e1e88e75d99ad3f03e16211f53a" alt="Screenshot of the DFS Management console showing the FC12ClusterTemp folder targets with the Properties command highlighted for the selected folder target in the Actions pane." width="3453" height="2479" data-path="images/flexi-capture/DFS48.png" />
   </Frame>

2. Click **Advanced**, select the **Override referral ordering** option, and then select **First among all targets**. This option means that users are always directed to the selected folder target when it is accessible.

<Frame>
  <img src="https://mintcdn.com/abbyy/IFr-A2MDVJd80FDs/images/flexi-capture/DFS49.png?fit=max&auto=format&n=IFr-A2MDVJd80FDs&q=85&s=2aa734100a82c5609c28550716361e13" alt="Screenshot of the Advanced tab of the folder target Properties dialog box with the Override referral ordering option enabled and First among all targets selected." width="400" height="455" data-path="images/flexi-capture/DFS49.png" />
</Frame>

## <a id="dfs-setting-fcprocessingserver" />Configure the ABBYY FlexiCapture Processing Server service

To keep the cluster hosting the ABBYY FlexiCapture Processing Server service running even if the file storage fails, complete these steps.

<Warning>
  If the file storage fails, the data about the sessions that are open at the time of failure may be lost.
</Warning>

1. Complete steps 1 through 4 described in [Set up the ABBYY FlexiCapture Processing Server service](/flexi-capture/admin-guide/fail-safety-proc#procserv-local-setup), but in step 1, change the path to the file that contains the Processing Server settings. The command in step 1 should be as follows:

```
sc config ABBYY.ProcServer.FlexiCapture.12.0 binpath= "%systemdrive%\Program Files\ABBYY FlexiCapture 12 Servers\FlexiBRSvc.exe \service -stationType:server -inifile:\\cluster2016.com\DFS\FC12ClusterTemp\serversettings.xml"
```

<Warning>
  Copying and pasting the above command may introduce redundant new line characters, resulting in an error. If this is the case, type the command manually.
</Warning>

2. Change the `%appdata%` variable directly in the Windows registry to `\\cluster2016.com\DFS\FC12ClusterTemp` (see [Change the %appdata% variable](/flexi-capture/admin-guide/fail-safety-proc#appdata-changing)).
