Unable to delete Volume Shadow Copies

I have a Shadow Copy which has been created by a backup, but it wasn't deleted.  The volume is shown as follows:

C:\Users\lclayton>vssadmin list shadows
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Contents of shadow copy set ID: {88ac6df1-6ef9-464b-9586-afe02ba5a84b}
   Contained 2 shadow copies at creation time: 20.08.2015 19:35:32
      Shadow Copy ID: {1343a989-cc26-4d6c-bebf-a1ad15bddd5f}
         Original Volume: (?)\\?\GLOBALROOT\Device\HarddiskVolume170\
         Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2480
         Originating Machine: mgmt44.mgmt.local
         Service Machine: mgmt44.mgmt.local
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessible
         Attributes: Persistent, Client-accessible, No auto release, No writers, Differential

When I try to delete the shadows, using the command "vssadmin delete shadows /all", I get the following error:

C:\Users\lclayton>vssadmin delete shadows /all
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Do you really want to delete 1 shadow copies (Y/N): [N]? y

Error: Either the specified volume was not found or it is not a local volume.

I get the same error when specifying the Shadow Copy ID, like this:

C:\Users\lclayton>vssadmin delete shadows /shadow={1343a989-cc26-4d6c-bebf-a1ad15bddd5f}
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Do you really want to delete 1 shadow copies (Y/N): [N]? y

Error: Either the specified volume was not found or it is not a local volume.

I have done a "vssadmin list writers" and every writer in the system is State: [1] Stable and Last error shows as "No Error"

How can I go about deleting these shadow copies?
LVL 18
LesterClaytonAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Cliff GaliherCommented:
VSS keeps a lost of shadow copies if has created. Shadow copies can be in the list, but stored on volumes not actually currently attached to the machine. If a copy was made onto a USB disk, for example. So the list command will show that VSS is aware the shadow copy exists, but delete will fail because the volume is bot present. That is the error you are seeing.
LesterClaytonAuthor Commented:
While your response seems quite logical, and pretty much similar to what other Google searches return, it's not something I can accept.

I have another server which has got a snapshot listed from yesterday, which I am unable to delete.

Contents of shadow copy set ID: {77d37092-106a-4017-87d1-2193ea12fedc}
   Contained 3 shadow copies at creation time: 27.08.2015 18:57:01
      Shadow Copy ID: {74bf0a10-e310-49af-b1bb-ac0c99de1da8}
         Original Volume: (?)\\?\GLOBALROOT\Device\HarddiskVolume272\
         Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy4332
         Originating Machine: mgmt41.mgmt.local
         Service Machine: mgmt41.mgmt.local
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessible
         Attributes: Persistent, Client-accessible, No auto release, No writers,
 Differential

      Shadow Copy ID: {a1aee319-002a-4428-ad1c-f3ea6e3d479f}
         Original Volume: (?)\\?\GLOBALROOT\Device\HarddiskVolume274\
         Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy4333
         Originating Machine: mgmt41.mgmt.local
         Service Machine: mgmt41.mgmt.local
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessible
         Attributes: Persistent, Client-accessible, No auto release, No writers,
 Differential


C:\Users\lclayton>vssadmin delete shadows /all
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Do you really want to delete 2 shadow copies (Y/N): [N]? y

Error: Either the specified volume was not found or it is not a local volume.

This snapshot is not even 24 hours old.

These servers are running Hyper-V and a ton of virtual machines - they're inside a datacenter, and they do not get USB disks plugged into them.  They have regular volumes and Cluster Shared Volumes, but they remain pretty static throughout.  No volumes have been added or removed in the last 24 hours, yet the command to delete the snapshot fails.
LesterClaytonAuthor Commented:
Additional information: I've found an error!

I've seen an Event in my Applicaiton log - Event ID 12289 logged 27.08.2015 18:57:01 (same time as the last shadow copy I posted)

Volume Shadow Copy Service error: Unexpected error DeviceIoControl(\\?\GLOBALROOT\Device\Harddisk10\ClusterPartition2 - 0000000000000258,0x0053c014,000000B0E943B960,0,000000B0E943A950,4096,[0]).  hr = 0x80070057, The parameter is incorrect.
.

Operation:
   Processing PostCommitSnapshots

Context:
   Execution Context: System Provider

OK, at least we know why the volume shadow is not actually there - since its creation failed - and would also explain why we cannot remove it.  But how do we get it removed from the volume shadow list?  Restarting the Volume Shadow Copy service is not a solution since the service only runs when it is needed - right now it's not running.
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Cliff GaliherCommented:
You don't.
LesterClaytonAuthor Commented:
For anybody else who's going to attempt suggestions, let it be known that I have also attempted to use diskshadow to purge these orphaned disk shadows from the system.

DISKSHADOW> list shadows all

Querying all shadow copies on the computer ...

        * Shadow copy ID = {1343a989-cc26-4d6c-bebf-a1ad15bddd5f}               <No Alias>
                - Shadow copy set: {88ac6df1-6ef9-464b-9586-afe02ba5a84b}       <No Alias>
                - Original count of shadow copies = 2
                - Original volume name: \\?\GLOBALROOT\Device\HarddiskVolume170\ [volume not on this machine]
                - Creation time: 20.08.2015 19:35:32
                - Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2480
                - Originating machine: mgmt44.mgmt.local
                - Service machine: mgmt44.mgmt.local
                - Not exposed
                - Provider ID: {b5946137-7b9f-4925-af80-51abd60b20d5}
                - Attributes:  No_Auto_Release Persistent Client_accessible No_Writers Differential

Number of shadow copies listed: 1

DISKSHADOW> delete shadows all
Deleting shadow copy {1343a989-cc26-4d6c-bebf-a1ad15bddd5f} on volume \\?\GLOBALROOT\Device\HarddiskVolume170\ from provider {b5946137-7b9f-4925-af80-51abd60b20d5} [Attributes: 0x0
002001d]...
Shadow copy not found.

Number of shadow copies deleted: 0

And I've also tried WMI:

C:\Users\lclayton>wmic
wmic:root\cli>shadowcopy
Caption  ClientAccessible  Count  Description  DeviceObject                                        Differential  ExposedLocally  ExposedName  ExposedPath  ExposedRemotely  HardwareAssisted  ID                                      Imported  InstallDate                Name  NoAutoRelease  NotSurfaced  NoWriters  OriginatingMachine  Persistent  Plex   ProviderID                              ServiceMachine     SetID                                   State  Status  Transportable  VolumeName
         TRUE              2                   \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2480  TRUE          FALSE                                     FALSE            FALSE             {1343A989-CC26-4D6C-BEBF-A1AD15BDDD5F}  FALSE     20150820193532.637194+120        TRUE           FALSE        TRUE       mgmt44.mgmt.local   TRUE        FALSE  {B5946137-7B9F-4925-AF80-51ABD60B20D5}  mgmt44.mgmt.local  {88AC6DF1-6EF9-464B-9586-AFE02BA5A84B}  12             FALSE          \\?\GLOBALROOT\Device\HarddiskVolume170\

wmic:root\cli>shadowcopy delete
Delete '\\MGMT44\ROOT\CIMV2:Win32_ShadowCopy.ID="{1343A989-CC26-4D6C-BEBF-A1AD15BDDD5F}"' (Y/N/?)? Y
Deleting instance \\MGMT44\ROOT\CIMV2:Win32_ShadowCopy.ID="{1343A989-CC26-4D6C-BEBF-A1AD15BDDD5F}"
ERROR:
Description = Not found
Cliff GaliherCommented:
As I said, you don't. The list is simply an audit trail and is not meant to be deleted.
LesterClaytonAuthor Commented:
https://technet.microsoft.com/en-us/library/cc788116.aspx

Vssadmin list shadows

"Lists all existing shadow copies of a specified volume. If you use this command without parameters, it displays all volume shadow copies on the computer, in the order dictated by Shadow Copy Set."

What you claim is contrary to what is documented at Technet.  Please cite your sources.
LesterClaytonAuthor Commented:
Rebooting the server resolved the problem - the servers no longer list the orphaned disk shadows.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LesterClaytonAuthor Commented:
While there has been some feedback from members of the community, no useful suggestions were made to aid me in resolving the matter.  From all the Googling I have done, it seems that the issue I've encountered is a rare situation and could even be a bug, but I did not have the time nor energy to log a ticket with Microsoft.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.