Windows 2008 R2 winsxs folder - growth increases

I've seen many posts about this folder on the serverfault.com site but none helped me solve my issue.

I have at least 20 servers with fully packed system partitions (I don't know why, but all system partitions have been configured with 30GB).

The operating system on all servers is Windows server 2008 R2, no SP1 is installed and therefor the tools are non-existent (compcln.exe and vsp1clean.exe), in addition to that i'm not allowed to install SP1 on the servers.

Where ever it was possible i deleted many $NT... folders from the Windows directory and in some servers it did solve the free space issue, but on the rest of the servers I couldn't find any $NT... folders to delete.

Shadow copy is disabled on all servers as well as system restore.

The windows cleanup tool is missing from the right click menu -> properties window of the disk.

I understand that tempering with the WinSxS folder manually is not recommended.

Is there a known solution to my problem?


Solution 1:

The solution to your problem is to buy bigger disks. After 10 years of updates, my servers still on Server 2003 are running their 30 GB volumes out of space on a regular basis.

And Windows 2008 R2 on a 30 GB volume? Forget about it; they just need more space. And if your disks are full, sounds like new server hardware's going to be damn near required as well. You can bit the bullet now or later. Now is cheaper.

Personally, I tend to favor a mirror RAID for the OS disk, and where needed, a 4-disk RAID 10 for the data partition (since practically every server made in the last 10 years supports at least 6 physical disks), but either way, this type of situation is why it's best to keep your data and OS volumes on different disks.

Solution 2:

Solution/Work-Around:

If you need to reclaim this space, your safest bet is to avoid "deleting" anything, but to instead, move this folder and all it's files. You can safely do this following the instructions below to any local/live, online, near-line, or offline storage as long as that storage system that can be mounted to a drive letter or any mount point on the NTFS file system. Any of the following will work:

  • another live (mounted) partition
  • an optical disc (CD, DVD, etc.) with a live filesystem like FAT, or NTFS
  • an external hard drive
  • a USB drive
  • a network drive

Whenever you are prompted for the media/receive any errors about missing files/missing location, you simply make sure to remount/reinsert your drive/media if it's not already a live partition.

Once moved, in order to "link" the old mount point/location (in most cases C:\ProgramData\Package Cache\), you simply create a directory junction to it.

Junctions are recognized at the file systemlevel as an alias entry in the FSTAB. Therefore, it's transparent to all programs, including the OS itself. In other words, it is NOT seen as a file that simply points to another location (like a shortcut) and therefore always works without incident.

  1. You would move the folder(s) in question to its new location
  2. Create the junction

    • Option 1. (natively): Just issue the built-in Windows Vista / 7 / 8 command and the cmd prompt:

      mklink /J oldpath newpath
      

      NOTE: If you make the newpath absolute, you'll be able to move link without breaking the pointer to the newpath. If you make the newpath relative, you'll be able prevent breaking the link, as long as you move BOTH the link and target TOGETHER and maintain their relative paths.

    • Option 2. (using a tool): Another GREAT alternative is a free handy utility I've been using for years called "Link Shell Extension". LSE is free and you can find it here (or Google for it): http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

      LSE allows you to create symlinks, hardlinks, junctions, smartcopies, smartclones, smart mirrors, smart moves, splices, multiple sources, and bunch of other stuff I found too confusing to read, frankly. But, it's a brilliant free product that creates a Windows Explorer context menu that allows you right-click on your LINK-TARGET folder then drag it to where you'd like to create the actual link. You can of course rename the link to anything you'd like.