Woody Windischman


SharePoint 2010 and the C Drive

Jun-292010

wpe9Minimizing Your Footprint

I recently participated in an MVP chat, and we got an interesting question about SharePoint storage requirements. I answered the question as well as possible given the chat format, but the issue really deserves a more thorough treatment.

Reading through the SharePoint 2010 system requirements you quickly come across one that seems a bit strange. SharePoint is asking for 80 Gigabytes of hard disk space! We all know that SharePoint itself isn't that big, so where is that requirement coming from? Not only that, but where is that space actually required? And, can it be moved around?

Here's the kicker - SharePoint itself doesn't actually "require" that space, Windows does (in a way). But, SharePoint knows this, and will give you warnings in Central Administration if your C: partition doesn't have double your "physical" RAM free. This is because when Windows crashes, it creates a memory dump on the system volume, and needs free space to do it. In addition, Windows sets up a hard drive cache for swapping chunks of memory around - that's also usually around double your RAM. Further, if you have a hibernation file on your hard drive, that's also going to be the size of your RAM. Finally, you need the space that Windows, SharePoint, and any other applications actually do take up. And a little bit of buffer, so you can actually do some work.

If you've got 8 GB of RAM (the minimum recommended for a SharePoint production environment), that adds up pretty quickly. Hence, the storage requirements. Now, some of these pieces can be easily shifted around in Windows. Most servers don't need a hibernation file, for example, and you can easily move the swap file and dump locations onto other volumes. Then you can go into Central Administration's Health Monitoring to tell SharePoint to not monitor the drive space, so you don't get the warning (I haven't found a way to tell SharePoint to monitor a different drive, unfortunately). But there is still more going onto drive C: than many corporate Windows Server administrators like.

SharePoint Stuff you Can and Can't Move

Let's get this out of the way right up front. You can't tell SharePoint where to install certain things. The core of SharePoint - the "SharePoint root" or "14 hive" - is always going to be installed on your system drive (usually C:), in "\program files\common files\Microsoft shared\Web Server Extensions". That's where it goes. You can't configure this during Setup. You can't move it after the fact. Learn it. Live with it. Embrace it. Love it.

Other stuff, however, can be controlled. Just not always easily. Let's get the easy stuff taken care of.

  • Your SharePoint content (the stuff you actually store in your sites) is going into SQL Server. You usually have full control over this, but there are lots of articles discussing SQL Server configuration so I'm not going to go into the gory details here.
  • On versions of SharePoint other than Foundation, you can configure where certain non-core SharePoint components are stored during Setup. That's where things like search indexes go. But that doesn't change the location of the SharePoint root as described above.
  • You can control where SharePoint stores certain log files. By default, those go into the SharePoint root, but they can be configured in Central Administration to be stored just about anyplace you please. Given how large these can grow, you almost certainly want to move them, and enable compression on the target folder.

SharePoint is also dependent upon Windows' Internet Information Services (IIS). When you activate the Web Server and/or Application Server roles on Windows Server 2008 and 2008 R2, several IIS components are pre-configured to be hosted on the system drive - most notably the INETPUB folder (which hosts your SharePoint Web Applications) and the IIS log files that get stored in the Windows\System32 folder (which can also become huge). In versions of Windows prior to 2008, it was an easy enough task to tell IIS to move these to another location. Not so with IIS 7.x and Windows Server 2008. Try as hard as you might, you won't find that configuration information in the management console.

Fortunately, these things can be moved. Unfortunately, moving them can only be done through the command line, and the commands to do it aren't trivial. The best instructions I've found for this are on IIS Program Manager, Thomas Deml's, Blog. In this, he not only describes the commands needed, but gives you a batch file to move the IIS root. Unfortunately, even Program Managers aren't immune from typos, and his batch file actually contains a couple of extra "\" characters. I've corrected the file, and made it available for download here. This batch file should be run after you install the SharePoint prerequisites, but before the actual SharePoint setup. Just as with the SharePoint logs, you should compress the folder you're storing the IIS logs in.

Summary

That's about it. SharePoint's requirements do state that you need 80GB of hard drive, but as you have seen, that statement is a little fuzzy about the why and where you need it. Although the default is drive C, many corporations have policies limiting what you do on the C drive. In this article, I've described how you can move many of these items around. I hope this has given you the information you need, or at least food for thought.

 
Posted by Woody Windischman | 14 Comments | Trackback Url | Bookmark with:        
Tags:

Links to this Post

Comments

Tuesday, 29 Jun 2010 09:10 by Matt Bramer
Excellent write up. I used your installation notes for 2007 and my install went flawless. When I move to 2010, I'll definitely read over this article again. Thanks!

Thursday, 22 Jul 2010 06:34 by Marty
The 14 Hive can be installed on a separate partition if the environmental variables are configured correctly prior to installation. Nice article, though. Limited drive space can be a hassle sometimes.

Monday, 16 Aug 2010 07:53 by Erik Heaivilin
Awesome info!!!! 5 stars! I've been struggling due to using a VM and this article was a big, big help :)

Tuesday, 24 Aug 2010 04:32 by Jeremy
I was just wondering where files that I create in SharePoint Designer 2010 are actually physicall stored on the server. For example, if I create testfile.aspx, where is the file kept? If I copy and paste a .pdf file into SharePoint Designer, where does that file go in the file system on the server, and can that be changed?

Wednesday, 25 Aug 2010 07:06 by Woody
Jeremy, generally speaking, nothing you do in SharePoint Designer goes to the hard drive of the web server. Everything is stored in the Content database that hosts the particular web you are editing. This is presented as a file structure, but is actually just a huge table in SQL Server.

Tuesday, 14 Sep 2010 01:18 by Eric
Thanks for the article. We are getting the disk space warning on our SQL backend that is also a WFE for SSRS integration purposes. It is a 120GB C drive, with 91 GB free. But, I believe the warning is triggered because we have 24 GB RAM, and it wants to see >120 GB free disk space on C (5x24GB). I'm tempted to turn off the warning.

Wednesday, 10 Nov 2010 01:34 by Amir
Thanks for a very helpful write-up. You stated (in bold) that the inetpub folder shouls only be moved after installing the SP prereqs. What is the reason for that? I'm trying to explain this to the infra guys and it would help if I knew what the impact is if its done in an incorrect order. Again, very helpful information, Woody. Thanks Amir

Wednesday, 10 Nov 2010 04:59 by Woody
Hi Amir. The reason for that is that on a clean build, most folks won't have the application server or web server roles installed prior to installing the prerequisites. Therefore, without the prereqs installed, there isn't anything there to move, and the script will fail. On the other hand, once you install the SharePoint binaries, even before running the configuration wizard, it has looked at and stored the location of the IIS root, and will try to use the original location. Thus the order I specified: 1. Prerequisites, 2. Move IIS (if needed), and 3. Install SharePoint binaries.

Monday, 29 Nov 2010 04:09 by Dhiraj
Thanks for the nice update. Actually i have installed share-point 2010 from scratch in default setting for built in server but my c drive is filling up how can i move the WSS-Content to d drive. Can you help me on this..

Sunday, 30 Jan 2011 04:54 by treddy
@Marty - what do you mean by "if the environmental variables are configured correctly prior to installation" ? thanks!

Thursday, 3 Feb 2011 12:03 by SCossio
Thanks for the write-up. FWIW, I have also found out that even if you run the script after installing SP, SP works (so far, I will update the comment if this changes)

Wednesday, 30 Mar 2011 09:09 by Ian
I've been trying to install Sharepoint 2010 on a server that only has 13GB free space on C drive. I realise this is not enough, but the strange thing is that I can't even launch the installer from the sharepoint CD - it just fails silently. If I find the Setup Log, I can see the following error: Error: Failed to check free space in drive "" ErrorCode: 3(0x3). Has anyone else seen this? I will let you know if increasing C drive space fixes it.

Thursday, 14 Jul 2011 04:46 by Mark Countess
I have a 34G free space on the C Drive and a 320G D Drive. I implemented the batch file. After install there is 17G of free space remaining on the C drive. What SharePoint items will eat at that 17G?

Thursday, 15 Sep 2011 11:34 by Majid
Great Article. Unfortunately this is one of the hidden gems that Microsoft doesn't advertise well. Makes it difficult when many organization server standards have limits on C Partition. Follow this article and avoid reaching the disk space warnings

Name:
URL:
Email:
Comments: