LesterClayton
asked on
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:
When I try to delete the shadows, using the command "vssadmin delete shadows /all", I get the following error:
I get the same error when specifying the Shadow Copy ID, like this:
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?
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-a fe02ba5a84 b}
Contained 2 shadow copies at creation time: 20.08.2015 19:35:32
Shadow Copy ID: {1343a989-cc26-4d6c-bebf-a 1ad15bddd5 f}
Original Volume: (?)\\?\GLOBALROOT\Device\H arddiskVol ume170\
Shadow Copy Volume: \\?\GLOBALROOT\Device\Hard diskVolume ShadowCopy 2480
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
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-a
Contained 2 shadow copies at creation time: 20.08.2015 19:35:32
Shadow Copy ID: {1343a989-cc26-4d6c-bebf-a
Original Volume: (?)\\?\GLOBALROOT\Device\H
Shadow Copy Volume: \\?\GLOBALROOT\Device\Hard
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.
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-4d6 c-bebf-a1a d15bddd5f}
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.
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?
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.
ASKER
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.
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.
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-2 193ea12fed c}
Contained 3 shadow copies at creation time: 27.08.2015 18:57:01
Shadow Copy ID: {74bf0a10-e310-49af-b1bb-a c0c99de1da 8}
Original Volume: (?)\\?\GLOBALROOT\Device\H arddiskVol ume272\
Shadow Copy Volume: \\?\GLOBALROOT\Device\Hard diskVolume ShadowCopy 4332
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-f 3ea6e3d479 f}
Original Volume: (?)\\?\GLOBALROOT\Device\H arddiskVol ume274\
Shadow Copy Volume: \\?\GLOBALROOT\Device\Hard diskVolume ShadowCopy 4333
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.
Contained 3 shadow copies at creation time: 27.08.2015 18:57:01
Shadow Copy ID: {74bf0a10-e310-49af-b1bb-a
Original Volume: (?)\\?\GLOBALROOT\Device\H
Shadow Copy Volume: \\?\GLOBALROOT\Device\Hard
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-f
Original Volume: (?)\\?\GLOBALROOT\Device\H
Shadow Copy Volume: \\?\GLOBALROOT\Device\Hard
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
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.
ASKER
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)
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.
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(\\?\GLOBAL ROOT\Devic e\Harddisk 10\Cluster Partition2 - 0000000000000258,0x0053c01 4,000000B0 E943B960,0 ,000000B0E 943A950,40 96,[0]). hr = 0x80070057, The parameter is incorrect.
.
Operation:
Processing PostCommitSnapshots
Context:
Execution Context: System Provider
.
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.
You don't.
ASKER
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.
And I've also tried WMI:
DISKSHADOW> list shadows all
Querying all shadow copies on the computer ...
* Shadow copy ID = {1343a989-cc26-4d6c-bebf-a 1ad15bddd5 f} <No Alias>
- Shadow copy set: {88ac6df1-6ef9-464b-9586-a fe02ba5a84 b} <No Alias>
- Original count of shadow copies = 2
- Original volume name: \\?\GLOBALROOT\Device\Hard diskVolume 170\ [volume not on this machine]
- Creation time: 20.08.2015 19:35:32
- Shadow copy device name: \\?\GLOBALROOT\Device\Hard diskVolume ShadowCopy 2480
- Originating machine: mgmt44.mgmt.local
- Service machine: mgmt44.mgmt.local
- Not exposed
- Provider ID: {b5946137-7b9f-4925-af80-5 1abd60b20d 5}
- 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-a 1ad15bddd5 f} on volume \\?\GLOBALROOT\Device\Hard diskVolume 170\ from provider {b5946137-7b9f-4925-af80-5 1abd60b20d 5} [Attributes: 0x0
002001d]...
Shadow copy not found.
Number of shadow copies deleted: 0
Querying all shadow copies on the computer ...
* Shadow copy ID = {1343a989-cc26-4d6c-bebf-a
- Shadow copy set: {88ac6df1-6ef9-464b-9586-a
- Original count of shadow copies = 2
- Original volume name: \\?\GLOBALROOT\Device\Hard
- Creation time: 20.08.2015 19:35:32
- Shadow copy device name: \\?\GLOBALROOT\Device\Hard
- Originating machine: mgmt44.mgmt.local
- Service machine: mgmt44.mgmt.local
- Not exposed
- Provider ID: {b5946137-7b9f-4925-af80-5
- 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-a
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\Hard diskVolume ShadowCopy 2480 TRUE FALSE FALSE FALSE {1343A989-CC26-4D6C-BEBF-A 1AD15BDDD5 F} FALSE 20150820193532.637194+120 TRUE FALSE TRUE mgmt44.mgmt.local TRUE FALSE {B5946137-7B9F-4925-AF80-5 1ABD60B20D 5} mgmt44.mgmt.local {88AC6DF1-6EF9-464B-9586-A FE02BA5A84 B} 12 FALSE \\?\GLOBALROOT\Device\Hard diskVolume 170\
wmic:root\cli>shadowcopy delete
Delete '\\MGMT44\ROOT\CIMV2:Win32 _ShadowCop y.ID="{134 3A989-CC26 -4D6C-BEBF -A1AD15BDD D5F}"' (Y/N/?)? Y
Deleting instance \\MGMT44\ROOT\CIMV2:Win32_ ShadowCopy .ID="{1343 A989-CC26- 4D6C-BEBF- A1AD15BDDD 5F}"
ERROR:
Description = Not found
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\Hard
wmic:root\cli>shadowcopy delete
Delete '\\MGMT44\ROOT\CIMV2:Win32
Deleting instance \\MGMT44\ROOT\CIMV2:Win32_
ERROR:
Description = Not found
As I said, you don't. The list is simply an audit trail and is not meant to be deleted.
ASKER
https://technet.microsoft.com/en-us/library/cc788116.aspx
What you claim is contrary to what is documented at Technet. Please cite your sources.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.