How install Lync 2013 local databases to a separate drive

(Updated 15 April 2013)

In the Capacity Planning Guidance we describe that the disk requirements for a Lync 2013 front end server, given our usage model, is eight disks configured as two drives.

  • One drive will use two disks in RAID 1 to store the Windows operating system and the Lync 2013 and SQL Express binaries
  • One drive will use six disks in RAID1+0 to store databases and transaction logs from the two SQL Express instances (RTCLOCAL and LYSS)

If you have front end server with only two disk drives the Install-CsDatabase command run during installation of Lync Server 2013 will automatically place the databases and transaction logs on the non-system disk drive.

However if you have more than two disk drives you can use the following process to specify the disk drive used for database and transaction logs. In the example, the system drive is C:, there is E: drive and F:\CsData should be used for databases and transaction logs.

  1. Start the Lync Server 2013 Deployment Wizard and accept the default location on the C: for the binaries
  2. Under Deploy perform Step 1 – Install Local Configuration Store
  3. When step 1 is done start Lync Server Management Shell and issue the following command:
    1. Install-CsDatabase -DatabasePaths F:\CsData -LocalDatabases
  4. Continue with step 2 and the remaining steps in the Lync Server 2013 Deployment Wizard

This approach will give the location of databases and transaction logs as described in the table below.

Instance

Database and Transaction logs

Drive

Note

RTCLOCAL

rtc

F:

   

RTCLOCAL

rtcdyn

F:

   

RTCLOCAL

xds

C:

Keeping the local CMS replica (xds database) on the C: drive is not an issue

LYSS

lyss

F:

   

Please also note that in Lync Server 2013 we create the rtc and rtcdyn databases and corresponding transaction logs with an initial size of 4 Gb. That mean in total 16 Gb. We are doing that to avoid any performance implication by extending the database and transaction log size during normal operations.

On a fresh Lync 2013 front end Step 3 in the above sequence will fail, because the LYNCLOCAL SQL Express instance has not been installed after step 1 in the deployment wizard. To work-around this problem you can do the following:

  1. Continue with step 2 in the deployment wizard and let it install the databases on whatever drive it decides
  2. After step 2, delete all databases in RTCLOCAL and LYNCLOCAL instances. You can do it via SQL Management Studio or by using the PS script below and replace Lync2013FE with the correct hostname
  3. Issue Install-CsDatabase cmd from 3) above
  4. Continue with step 3 in the deployment wizard

    $SqlServer = "Lync2013FE"    

    $connstring = "server=" + $SqlServer + "\rtclocal;trusted_connection=true;"

    $connection = new-object system.data.sqlclient.sqlconnection

    $connection.ConnectionString = $connstring

    $connection.Open()

 

    $command = new-object system.data.sqlclient.sqlcommand

    $command.Connection = $Connection

    $command.commandtext = "drop database rtc"

    $sqladapter = new-object system.data.sqlclient.sqldataadapter

    $sqladapter.selectcommand = $command

    $results = new-object system.data.dataset

    $reccount=$sqladapter.Fill($results) | Out-Null

    $command.commandtext = "drop database rtcdyn"

    $sqladapter.selectcommand = $command

    $results = new-object system.data.dataset

    $reccount=$sqladapter.Fill($results) | Out-Null

 

    $connection.Close()

 

    $connstring = "server=" + $SqlServer + "\lynclocal;trusted_connection=true;"

    $connection = new-object system.data.sqlclient.sqlconnection

    $connection.ConnectionString = $connstring

    $connection.Open()

 

    $command = new-object system.data.sqlclient.sqlcommand

    $command.Connection = $Connection

    $command.commandtext = "drop database lyss"

    $sqladapter = new-object system.data.sqlclient.sqldataadapter

    $sqladapter.selectcommand = $command

    $results = new-object system.data.dataset

    $reccount=$sqladapter.Fill($results) | Out-Null

 

    $connection.Close()

Comments

  • Anonymous
    September 03, 2013
    Having trouble completing what you have suggested above. I have a Lync Enterprise installed with a Front End Pool, that i have taken over and the Primary OS drive is 50GB, which doesn't leave much space left for anything else. This is my main driver to relocate the CsData (LocalDatabases) to alternative location. Do I need to uninstall the Front Ends before completing the above? Jens>My steps assumes the Front Ends are not installed. You might be able to re-locate the databases without uninstalling the front ends, but I don't know the steps. I would recommend contacting Microsoft support and get their assistance.