Storing repositories on a network share

With the default settings, VisualSVN Server stores all repositories in the same parent directory on a local disk. Storing repositories on a local disk is the preferred approach to get better response time and the maximum performance.

If you need to store your repositories on a remote disk for some specific reason, then we strongly recommend using either iSCSI storage or a block-level virtual drive disk. If neither of these options are available, the repositories may be stored on a network share, although doing so will most likely introduce a performance penalty. Note that when using the network share you have to check the version of the SMB protocol, because using unsupported version may lead to data corruption.

Perform the following steps to configure VisualSVN Server to store repositories on a network share:

  • Create a folder on a remote computer and share it.
  • Check that all the prerequisites are met (see below).
  • Configure required access permissions for the created folder (see below).
  • Set up VisualSVN Server to store repositories in the created folder (see below).

Prerequisites

There are the following prerequisites you need to check before storing repositories on a network share:

  • The minimum supported version of Windows network share is SMB 2.1. VisualSVN Server does not support SMB 1.0, SMB 2.0 and NFS/CIFS shares as the repository storage. Using unsupported network shares is strictly prohibited, because it may lead to corruptions in your repositories. See the section How to find out the SMB protocol version for more information.
  • VisualSVN Server does not support Microsoft DFS share as the repository storage. Microsoft DFS share does not guarantee that the replicated repositories are consistent, and the way DFS shares replicate data will in the course of time lead to repository corruptions.
  • Mapped network drives are not supported as they are mapped on a per-user basis and are not available for built-in accounts such as Network Service.

How to find out the SMB protocol version

With the default settings, negotiated SMB protocol version depends on the version of Windows OS on both computers: computer with the VisualSVN Server instance and the computer with the network share. Usually, when two computers negotiate through the SMB protocol, the lowest supported version will be chosen. You need to ensure that computer with your VisualSVN Server instance and the computer with the network share negotiate to use SMB 2.1 or later. Please use the table below to estimate the version of SMB that will be used.

Generic table of matching Microsoft operating system and the SMB version:

The minimum version of the involved OS SMB version
Windows 10 / Windows Server 2016 – 2019 3.1.1
Windows 8.1 / Windows Server 2012 R2 3.0.2
Windows 8 / Windows Server 2012 3.0
Windows 7 / Windows Server 2008 R2 2.1
Windows Vista / Windows Server 2008 2.0 (unsupported)
Previous versions 1.0 (unsupported)
Note
Negotiated SMB protocol version may also depend on the settings of both involved computers. If you have Windows 8 or later and you already setup SMB share, then the most convenient way to ensure the particular Server Message Block (SMB) protocol version would be running PowerShell cmdlet Get-SmbConnection.

Please see the official Microsoft documentation and TechNet blog articles for more details:

Configure required access permissions

Required access permissions for the repositories folder stored on a local disk are configured automatically by VisualSVN Server during the installation. If repositories are stored on a network share, you should configure access permissions manually.

Both share and NTFS access permissions should be configured to access NTFS volumes shared over the network.

Access permissions for the repositories folder located on a network share need to be granted to:

  • Account under which VisualSVN HTTP Service is running;
  • VisualSVN Server administrators accounts.

Permissions for VisualSVN HTTP Service account

By default, the built-in system Network Service account is used to run VisualSVN HTTP Service. This account has minimum privileges on the local computer and acts as the computer on the network, so you should simply grant access to the computer where VisualSVN Server is installed.

Perform the following steps to grant the required share permissions:

  1. Open Windows Explorer on the remote computer and browse to the required folder.
  2. Right-click the folder name and select Properties.
  3. Click the Sharing tab.
  4. Click Advanced Sharing.
  5. Select Share this folder and click Permissions.
  6. Click Add.
  7. Click Object Types, select the Computers check box, and click OK.
  8. Specify the name of the account:
    • Specify the name of the computer where VisualSVN Server is installed, if the service is running under built-in Network Service account; or
    • Specify the name of the dedicated user account that is used to run VisualSVN HTTP Service.
  9. Click Check Names to recognize the name of the security principal.
  10. Click OK.
  11. Select the Read and Change check boxes in the permissions list and click OK.
  12. Click OK.

Perform the following steps to grant the required NTFS permissions:

  1. Open Windows Explorer on the remote computer and browse to the required folder.
  2. Right-click the folder name and select Properties.
  3. Click the Security tab.
  4. Click Edit.
  5. Click Add.
  6. Click Object Types, select the Computers check box, and click OK.
  7. Specify the name of the account:
    • Specify the name of the computer where VisualSVN Server is installed, if the service is running under built-in Network Service account; or
    • Specify the name of the dedicated user account that is used to run VisualSVN HTTP Service .
  8. Click Check Names to recognize the name of the security principal.
  9. Click OK.
  10. Select the Modify check box in the permissions list.
  11. Click OK to apply settings.

Permissions for VisualSVN Server administrators

In most cases it is recommended to grant Full Control access permission for the repositories folder to domain administrators.

You can also grant appropriate read/write permissions to non-admin domain users that are authorized to manage VisualSVN Server using VisualSVN Server Manager console. Particular permissions settings depend on your domain configuration.

Note
It is a good practice to set up VisualSVN HTTP Service to run under a dedicated user account. This improves isolation of VisualSVN HTTP Service from other services that can be run under Network Service built-in account. See KB24 for details on configuring VisualSVN HTTP Service to run under a dedicated user account.

Set up VisualSVN Server to store repositories in the created share

To set up VisualSVN Server to store repositories in a remote folder:

  1. Open VisualSVN Server Manager.
  2. Right-click the VisualSVN Server node and select Properties.
  3. On the Storage tab, specify the Repositories Root path browsing to the required remote folder. Make sure that network path to your repositories folder is specified in the UNC format.
  4. Click OK.
Last Modified: