Moving SharePoint 2010 Log and Index Locations

There are two hard-drive locations on a SharePoint server (with enabled search indexing) that are in constant use and often require significant space – log files and index files folders.

Log files location can be easily specified in Central Administration: Monitoring – Configure Diagnostic Logging.
In the Diagnostic Logging screen, you can specify a new path for trace log files and change other settings, such as how long to keep trace files, and what sort of information will be logged there.

Index files location, unfortunately, is not available through Central Administration. It is typically specified during SharePoint installation phase, along with the software installation folder. However, there is a way to change it through stsadm command:
stsadm -o spsearch -indexlocation “d:\SharePoint\Data”

You can verify that it changed successfully by running the following command before and after changing the index:

References:

Configure diagnostic logging (SharePoint Server 2010)

Changing Index locations in SharePoint 2010

Updates:

I wanted to thank Tracy Sterling for submitting a very useful tip for modifying index locations through Central Administration, when you have farm SharePoint deployments and can alter search topology.

CA > Application Management > Manage service applications > Search Service Application > Search Application Topology (Modify) > Index Partition/Query Component (Edit Properties). Repeat for each query component within your farm.

Unfortunately, all the stand-alone deployments and foundation editions would still have to go through aforementioned stsadm command. Below is an illustration of Search Service Application and its missing modify option for a stand-alone installation of enterprise SP2010 server, running on my laptop.

12 thoughts on “Moving SharePoint 2010 Log and Index Locations”

  1. Hi Art,

    Just an FYI, you can in fact manipulate search index file locations via the Central Admin interface after installation.

    CA > Application Management > Manage service applications > Search Service Application > Search Application Topology (Modify) > Index Partition/Query Component (Edit Properties). Repeat for each query component within your farm.

    Cheers!
    -Tracy

  2. What Tracy described is a great solution when you have a farm deployment and can modify its topology.
    Unfortunately, it doesn’t work if you deploy SP2010 as stand-alone server (even enterprise edition) or a foundation edition, which is often the case for developers running SP on their laptops.
    Thanks for the great tip Tracy! It is definitely a useful one.

  3. Hi,

    I’m in the process of getting this set up & I wanted to get your thoughts in terms of the RAID configuration of setting up the Log & Index files.

    My thoughts are as follows:

    DISK 0 = RAID-1 (2 Disks) = > 2 Partions C:\(50GB) & E:\(75GB)
    C:\ => OS
    E:\ => Logs Files (these are the log files for Web & App Server, right ?)

    DISK 1 = RAID-5 (4 Disks) = > 1 Partition (150GB)
    F:\ => Index Files

    My SQL Server is hosted on another server so that is taken care of already.

    1. Does this look fine to you ?

  4. Hi,

    On further research, I realise that the LOG Files are actually the “DIAGNOSTIC LOGGING” for SharePoint (default Location = E:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS)

    Question:

    1. Is there a way to configure this during installation ?

    Thank You

    Regards

    Ian

  5. Ian, you can configure it right after the installation. The LOG location is easily accessible from Central Admin. Alternatively, if it’s really critical for you – you can try to do it through powershell script, as well as scripting the rest of deployment. Here’s one of the most popular automated deployment scripts http://autospinstaller.codeplex.com/

  6. Hi Ian, as you discovered yourself Log files are simply for diagnostic purposes. As far as RAID configuration and sizes I would use Microsoft guidelines http://technet.microsoft.com/en-us/library/cc298801.aspx and estimate the size of index based on the size of your content databases. http://blogs.msdn.com/b/enterprisesearch/archive/2010/06/09/sharepoint-2010-search-dogfood-part-3-query-performance-optimization.aspx: Size of Content DB(s) indexed * 0.035

  7. Is there any tool that would allow to view index? or at least to determine number of indexed words?

  8. I have SharePoint 2010 and need to have a Site I created look for documents and folders on the “D” drive in stead of the default location. Is this possible and if so what do I need to do to make this work? T/u

  9. A caveat I discovered for people considering this operation: When you point the index files somewhere else, the rest of the GUID-query folder moves as well. This would be OK if everything else continued to work, but I’ve found that the noise word files no longer function when they are not in the default path. That means when someone searches for ‘the’, they get results. Also, you won’t be able to exclude search terms like naughty words, etc. Just a heads-up.

Leave a Reply

Your email address will not be published. Required fields are marked *