2

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?

7
  • 1. Windows Server doesn't have System Restore. 2. If youy want to run the disk cleanup wizard you'll need to install the Desktop Experience feature. 3. Is there adjacent free space on the disk that you can extend the volume into?
    – joeqwerty
    Oct 31, 2012 at 14:29
  • Tried Winstatdir? Oct 31, 2012 at 15:41
  • @joeqwerty : No, it's a physical disk.
    – Itai Ganot
    Oct 31, 2012 at 19:14
  • @HopelessN00b : I'm using TreeSize, does it matter?
    – Itai Ganot
    Oct 31, 2012 at 19:15
  • 1
    @ItaiGanot No, whatever utility to find volume utilization works fine. I didn't read thoroughly enough; the solution to your problem is "buy new disks." Oct 31, 2012 at 19:30

5 Answers 5

4

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.

2
  • 1
    There's no doubt that this is the best solution and I totally agree with you that 30GB is not enough for a system disk these days, but my company made it very clear that they will not buy new servers in the near future and I'm actually looking for a "magic" solution because at the moment the servers, which are fully production servers and cannot be down for even 10 minutes, are not fully operative because of the free space issue.
    – Itai Ganot
    Oct 31, 2012 at 19:43
  • @ItaiGanot my company made it very clear that they will not buy new servers in the near future Well, you need to make it equally clear to them (tactfully) that the issues they're having are a result of these servers not having big enough disk drives. Period. If they don't want to buy new servers or new disk drives (and take an outage to mover the systems over), they will continue to have these problems, and that's just all there is to it. They want magic, tell them to hire a wizard, not an IT professional. Oct 31, 2012 at 19:48
4

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.

1
  • 1
    Great solution.. I've used this on servers and even on my software dev workstation with its tiny 128gb ssd and bloated visual studio libraries. Feb 10, 2018 at 19:27
1

Per this technet article you should be able to copy the proper clnmgr files out of the winsxs folders.

In order to use cleanmgr.exe you’ll need to copy two files that are already present on the server, cleanmgr.exe and cleanmgr.exe.mui.

For Windows Server 2008 R2 64-bit the two files are found in the following locations

C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe

C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui

Once you’ve located the files move them to the following locations:

Cleanmgr.exe should go in %systemroot%\System32.

Cleanmgr.exe.mui should go in %systemroot%\System32\en-US.

You can now launch the Disk cleanup tool by running from the run dialogue box, the start menu or the command prompt.

1

I solved it by moving that folder to another partition. My server is Windows 2008 R2, and is DC. Here's the steps:

  1. Logon as administrator. Copy C:\windows\winsxs to z:\windows\winsxs. Drive Z is on a different partition.
  2. Create a link for the new folder. In Command Prompt, excute "mklink /j c:\windows\winsxs_1 z:\windows\winsxs". It creates a link with name winsxs_1.
  3. Restart the server with Winodws 2008 R2 Installation Disk. When it starts, select Repair your OS, NOT Install. It will pop up the System Recovery Options window. Select the option "Use recovery tools that can help fix problems starting Windows". It lists the OS installed on this server. Write down the drive letter. Your C drive may not be C at this time. Mine is drive G. Then click Next.
  4. Use Command Prompt. Go to the drive that your OS was installed. And go to Windows folder. Rename Windows\winsxs to be winsxs_original. Rename the link windows\winsxs_1 to be winsxs.
  5. Exit the command windows, and restart the server.
  6. Logon as administrator. Find windows\winsxs_original. Take ownership. And grant administrator to have full control.
  7. Restart the server again. When it's fully started, try update/install/uninstall. And then check which folder has been updated. In my case, z:\windows\winsxs is updated. That means the OS is using the new location. Now you can delete c:\windows\winsxs_original.
0

I agree with the guys who are saying 30 GB is not enough for Windows 2008 R2, but I had the same issue you are facing in the past and I couldn't do anything other than deleting some files. A utility called WinDirStat helped me a lot in identifying which folder is taking too much space. In my case, it was IIS Log files and was hidden from System Tools like clean up. So, I deleted them manually and it was a good temporary solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .