This worked! Thanks. My 20 GB C drive had zero space. It now has 12 GB.
Thanks for this!
Automatically Clean Those Pesky Log Files on Your MediaSmart Server's System Drive
Categories: Hard Drives/Storage Server Mods and Hacking
The HP MediaSmart Server system drive is divided into two partitions, one 20GB partition for the OS and system files, and the rest devoted to storage for the data pool. Some users, myself included, have encountered an issue where the 20GB system partition fills up with data to the point where things like Windows Updates aren't possible because there isn't enough space to install them.
The culprit behind the disk consumption are these pesky log files that get generated. Over time these log files get huge, eating up gigbytes of space until there isn't any left in the system partition. Worse, there's no way to correct the issue from the home server console, and the disk cleanup wizard bundled with Windows doesn't find or remove them.
I've read various ideas as to the root cause, everything from errors with the Video Converter and certain video files, to issues with the backup service.
I haven't been able to figure out exactly what's causing it in my system, though I think my issue is with the Media Collector. However, I have determined that manually logging in via Remote Desktop every few weeks to deleting log files from the Windows folder manually is a real pain in the butt. So, I've devised a workaround for deleting them automatically. Not everyone will need to do this, but if you're having problems with your system drive filling up regularly or find yourself manually deleting log files all the time, this workaround will make this issue easier to deal with.
Step 1: Log into the Server Desktop via Remote Desktop

First, you'll need to log in to the server via remote desktop (not the console), which will give you access to the Windows desktop. To do this, launch remote desktop on your Windows PC (usually in accessories, but will vary based on which version of Windows you use). When prompted, type in the server name for your home server in the box. Mine, for example, is mss-ex495.
Hit Connect, and you'll be prompted for a user name and password. The user name you'll use is "Administrator" (it's the same on all of them). The password is whatever you use to log in to the home server console.
If you get a warning message when you log in, close it.
Now you'll be inside the Windows Home Server desktop, which should look like a basic version of Windows.
Step 2: Launch a web browser and download CCleaner.
While inside the Home Server desktop, click Internet Explorer (even if it's not your browser of choice, you only need it for about 2 minutes).
In the url bar, navigate to http://www.piriform.com/ccleaner Click the download button and download it to the home server (do not save it to the data pool, save it to the desktop or documents folder on the C drive). If you don't have enough space, you'll have to delete some log files or other stuff manually to create enough space to save and install it (running the disk cleanup tool should give you enough space for this), if not, search for .log files and you'll be able to find the massive ones.
CCleaner is a very useful tool that I've used for years. This tool is what we'll set up to handle deleting these massive log files for us automatically.
Step 3: Install CCleaner
Run the CCleaner program (inside the Windos Home Server desktop) and install it. It's a safe program, but sometimes it will try to install the Yahoo! Toolbar unless you uncheck the box. If you don't have enough space to install the program, like mentioned above, you'll need to go hunting for a few things to delete (look for one of those large log files).
Step 4: Clean the log files and configure for automatic cleaning.
Open up the CCleaner program. Fortunately, you won't have to worry about learning every in and out of this tool for our purposes. You will need to do a few things though.
First, CCleaner won't wipe these kinds of log files by default, so we need to tell it to look for them. To do this, scroll down the options list to the "Advanced" section and check the box next to IIS Log Files (see photo below). Also make sure "Windows Log Files" is also checked in the System area.

Next, click the "Options" tab at the far left. In "Settings," add a checkbox next to "Run CCleaner when the computer starts."
Click advanced, then check the box next to "Close program after cleaning."
Once you've done that, restart the server and those pesky log files should be gone. Some files less than 24 hours old may not be deleted now, but will in the future.
If you have some folders of large logs that are getting missed, you can add the folders they reside in manually. In the options area, click include, then you can add the folder you wish to have emptied, and CCleaner will remove these contents every time it runs.
Step 5: Resume Your Regularly Scheduled Programming
Provided you've followed the steps above and configured CCleaner to run at startup, all the log files taking up space will be removed each time your Windows Home Server restarts. Between Windows updates, power outages, and whatever it should restart often enough that your system drive never fills up, but if not, a quick restart will take care of it... at least until the culprit creating the logs is discovered or a server restore occurs.
Warning! Just because you can do it does not mean that you should do it! Recently, my EX485's system HDD began failing its nightly diagnostic routine. The effect was that my MSS was inaccessible. I was alarmed and stumped. I feared the worst, the loss of two years worth of data and structure. On advice from HP MSS support team, I was able to retrieve the system HDD and place it in an external enclosure. This permitted me to find, extract and send the log files as requested my the HP MSS support agent. I was able to send them and he diagnosed the drive's fault. SeaTools (diagnostic and repair utility)confirmed that bad drive by a failure in the short DST test. The drive could not be repaired in Seatools. Subsequently I restored the Server with a WD750 Black Caviar HDD. (warning! before replacing a system drive you should know that the replacement should be at least the same capacity as the original HDD. (2) avoid Samsung Spinpoint or any HDD with "Advanced formatting technology (3) Green drives for a system drive makes little sense, since the system drive is constantly working. Verify this with HP MSS support team if in doubt!) To finish, the recovery went perfectly, since the pool drives were not corrupted. I learned that MSS backups to USB only backup shares and not entire PC backups. This prevents you from using a MSS backup to clone new PC's (as in pirating). I now employ 2 external HDD's and do full shares backups on alternate months. The new Western Digital HDD is much quieter and cooler than the Seagate ever was. Too, the WD drive has a 5 year warranty! So, my advice is not to strip out log files simply for the love of tidiness. They are there for a reason and someone, somewhere can actually make sense of them, even if you cannot. Nuf said.
Thanks for this tip Matt!
I was out of space, did this, and, like another writer, also have 12 GB free on this drive. Since I have been using CCCleaner on my other machines, I was confident this would not be a problem. Everything now works perfectly!
Bill
I did this...It works perfectly. I went from 0 free to 12GB free. Frankly, had I not found this I would have given up on this server. Thanks to Matt for posting this.
View unverified member's comment - posted by Ahmed Abanaur
Matt,
Thanks for the great posts - I've been battling the WHS file bloat issue for a couple of years and CCleaner resolved it. One additional thing I did however was to add a daily scheduled routine to run CCleaner with " /AUTO" appended to the command line. This launches CCleaner at whatever time is selected and automatically keeps the log files at bay - without any need to reboot.
I did this. I works. Like others, I went from 0 to 12GB free. THANK YOU!!
FYI...a quick and dirty way to do this is to navigate to C:\WINDOWS\system32\LogFiles\W3SVC1 and then delete the older files.
RSS
