Manage Learn to apply best practices and optimize your operations.

Win10 Volume Shadow Copies May Need Cleanup

Mostly, the Windows Volume Shadow Copy Service works behind the scenes. This service coordinates among backup tools, applications in need of backup, and OS-provided storage management and hardware. Usually abbreviated VSS, this service enables creation and capture of shadow copies. Helpfully, TechNet defines “a consistent shadow copy” as “a snapshot or a point-in-time copy” of the runtime environment and the data it uses. Shadow copies let the OS and applications keep running and changing, even while backup is underway. Over time, shadow copies can accumulate, sometimes alarmingly. And that, dear readers, is why Win10 volume shadow copies may need cleanup or occasional pruning.

VSSadmin Helps When Win10 Volume Shadow Copies May Need Cleanup

Use the VSSadmin command to grapple with VSS and the shadow copies it creates and stores. Thus, you can (and should) consult the TechNet Command Line Reference for all the details on VSSadmin. For now, here’s an overview:

Vssadmin Command Description
delete shadows Deletes volume shadow copies.
list providers Lists registered volume shadow copy providers.
list shadows Lists existing volume shadow copies.
list shadowstorage Lists all shadow copy storage associations on the system.
list volumes Lists volumes that are eligible for shadow copies.
list writers Lists all subscribed volume shadow copy writers on the system.
resize shadowstorage Resizes the maximum size for a shadow copy storage association.

Source: TechNet Command Line Reference: Vssadmin page. All links are live to command options and details.
[Note: Command options not shown in this table are not supported in Windows 10.]

Getting a Handle on Volume Shadow Storage Consumption

By no coincidence, Vssadmin helps you explore shadow copy storage consumption in Windows 10. First, for an overview of which volumes use VSS, and how it lays out, the “list shadowstorage” option is handy. [Note: for Vssadmin, either PowerShell (Admin) or cmd.exe (“Run as administrator”) works equally well. I prefer PowerShell, because it is more powerful and responsive, and supports simpler cut’n’paste operations.]

Here’s a screen cap of the output for this command from my Lenovo T520 laptop:

t520-shadowstorage

Three of the five volumes available to the T520 currently support VSS storage.
[Click image to see full-sized version, please.]

Decoding Vssadmin Shadowstorage Info

Here’s some discussion to illuminate shadowstorage data:

  • The C: drive is the boot/system drive, a 250 GB (nominal, actual 237 GB) SSD. It has a relatively low maximum allocation of 9.5 GB to VSS. 6.04 GB of copy storage space is currently allocated, and 5.58 GB is currently used. On a smaller, faster SSD, this is just the way I like it.
  • The D: drive is an internal data and backup storage drive. Nominally 1 TB (931 GB actual) it has a maximum allocation of 179 GB. 172 GB is currently allocated, and 163 GB is currently used. This drive is my built-in backup storage. It handles Macrium Reflect and the built-in Backup and Restore (Windows 7) utility, too. I’m OK with a big allocation and usage load because it provides insurance. But 172 GB is a lot of storage!
  • The E: drive is an external, USB-attached data and backup storage drive. Nominally 2 TB (1.81 GB actual) it has a maximum allocation of 279 GB, of which only 13 GB is currently allocated and used. It’s my remote or “extra” backup, and provides coverage in case the laptop gets lost, stolen, or becomes unusable.

Pruning Shadow Copies Using Vssadmin

Current consumption and allocation numbers for D: are kind of high. Thus, I use the Vssadmin list shadows /for=D: command to show them to me. Indeed, I count 27 separate shadow copies in total, dated back as far as Christmas day, 2016. I don’t need this many, so I will do some pruning.

Sure, you can prune using delete shadows, with any of a variety of options. I prefer to resize shadowstorage instead. It automatically prunes shadow copies as the allocation for shadow copy storage is reduced. Pruning starts with the oldest shadow copy, and works up to the most recent shadow. Accordingly, I reset the maximum allocation to 50% of its current value (179 GB goes down to 85 GB). As expected, that cuts the number of shadow copies to 13. Of those copies, the oldest is now dated April 16, 2017. The syntax for that command is:

vssadmin resize shadowstorage /for=D: /on=D: /maxsize=85GB

Dealing with “Foreign Shadow Copies”

The resize shadowstorage option also offers another useful benefit. As I look at what’s on my E: drive, I see that its shadows come from an obsolete PC.  That is, they come from a previous incarnation of my production PC named “ETprodPC.” Notice what happens when I try to delete one of those shadow copies, as shown in this screen capture:

t520-eshadows

If your PC didn’t create a shadow copy, Vssadmin won’t let you delete it directly. But there’s a trick…

Because the running OS didn’t create that shadow copy, Vssadmin won’t let you delete it. But if you can use resize shadowstorage with /maxsize set to a low number. 400MB works fine, because it’s less than what most shadow copies consume. And that gets rid of foreign shadow copies when executed. Afterward, you can re-run the resize command to upsize your storage allocation.

I’d recommend checking shadow copies no less frequently than twice a year. You can prune excess copies quickly and easily and save big on disk space consumption. This is especially helpful on tablets and laptops, where storage space is usually at a premium.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchVirtualDesktop

SearchWindowsServer

SearchExchange

Close