Sunday, March 28, 2010

3/3 Where did all my disk space go

When your system is new, the disk space disappears rapidly although you may not add a lot of files yourself.
The reason is probably an increase of your allocated shadowstorage. With each install and uninstall, Vista or Windows7 writes a shadow (restore point) of about 1GB - plus one is written each day in Vista and each week in Windows7. For that purpose Vista reserves 15% of your OS disk partition and allocates/uses it as needed. The allocation in Windows7 is variable from 3 to 15% depending on the size of your C-disk.
Find Command Prompt (in All Programs > Accessories > Command Prompt), right click on it and Open as Administrator. Into the little black window type VSSADMIN LIST SHADOWSTORAGE and hit ENTER. It will show 3 numbers:
Allocated - that is the amount that it has grabbed from your OS partition at this time
Used - this is the amount currently used
Maximum - this is the ultimate amount it will allocate and use

Once you reach "maximum", it will reuse the space deleting the oldest shadows for the storage of the newest shadows. With e.g. a 200GB OS partition you should expect a maximum of 30GBs that are reserved for the system and that you cannot use. If your OS partition is larger or smaller, the shadowstorage will be accordingly (always 15% Vista but variable in Windows7) But the restore points (shadows) are required the day you need to do a system restore.
The easiest way to change the shadowstorage is with this cmd command: (for the case where you want to set it to the minimum which is 300GB)
Vssadmin Resize ShadowStorage /For=C: /On=C: /MaxSize=300MB

If you want to set it to e.g. 20GB, the command would look like this:
Vssadmin Resize ShadowStorage /For=C: /On=C: /MaxSize=20GB

Never forget GB or MB behind the MaxSize number because then the system will assume bytes and you will get an error.
Note: In Windows7 you can also set it in System Protection, but you have to be a good scout to find it. The cmd way is faster – just paste the command into cmd and adjust the last number to your liking. You have to, of course, also adjust the drive letter if you apply it to other than C.

No comments:

Post a Comment