Start a Conversation

Unsolved

This post is more than 5 years old

2316

September 28th, 2013 09:00

Cannot deactivate admsnap session

We have recently started having problems with backing up one of our SAN drives and it appears this is because the deactivation of the snapshot is not working correctly. This leaves an old snapshot "mounted" (visible in disk management) and therefore seems to prevent newly created snapshots from being correctly activated. If we restart the server on which the snapshot is mounted the mounted drive is removed and the process works again for 1-2 days but the problem then re-occurrs.

We use admsnap (batch files run using scheduled tasks) in the following order:

1. On production host use admsnap to flush buffers (admsnap flush)

2. On production host start a session against the desired storage device (admsnap start)

3. On mount host activate the snapshot (admsnap activate)

4. On mount host perform backup / testing on snapshot device

5. On mount host deactivate the snapshot on backup device (admsnap deactivate)

6. On production host stop session (admsnap stop)

I have tried running the deactivate comand manually from command line but recieve the following error:

An error occurred while deactivating session "session-name" on device "\\.\PhysicalDrive6".
Error:  0x3E05003F (Session exists but not deactivated)

Error.  There were no devices deactivated for session session-name.

The production server and mount hosts are both running Windows Server 2008 R2.

Any ideas would be much appreciated.

6 Posts

September 28th, 2013 09:00

Gave it a try but no joy. Thanks for the suggestion.

1 Rookie

 • 

20.4K Posts

September 28th, 2013 09:00

yep

6 Posts

September 28th, 2013 09:00

Thanks, I'll give that a try. I assume that is with the command - admsnap flush -o "drive letter":?

1 Rookie

 • 

20.4K Posts

September 28th, 2013 09:00

i like to flush buffers on target host before i issue deactivate command.

1 Rookie

 • 

20.4K Posts

September 28th, 2013 14:00

i used to work on storagetek arrays (before SUN bough them) and they did not have any integration packages like admsnap, there i used mountvol command to mount and unmount snapshot devices. Check it out

September 28th, 2013 18:00

In addition to flushing buffers which is a good habit, you also need to make sure there aren't any processes/services using the drive letter or else the deactivate it will fail.

110 Posts

September 29th, 2013 01:00

Can you try?

Flush the cache, remove the disk from server access, and deactivate.

The powermt will help you to remove the device, but I guess the admsnap deactivate won’t work on that backup / testing server.

Regards,

Periyakaruppan N (Peri),

6 Posts

September 29th, 2013 03:00

Do you have any best practice for ensuring that there are no services or processes using this drive?

September 29th, 2013 23:00

I would recommend identifying what handles may be preventing you from deactivating the session (assuming this is the issue).  I'm personally a fan of (MS) Sysinternals tools specifically for this task: Process Explorer.

http://technet.microsoft.com/en-us/sysinternals/bb896653

1) Run the tool

2) CTRL-F (find)

3) Then type in the drive letter as follows: D:\

There also is another CLI tool from Sysinternals called handle and from a privileged command prompt you simply run (you may consider putting into the %SYSTEMROOT\system32 directory):

handle D:

Here is an EMC KB article providing a common list of processes (and other things such as maybe use of Dynamic Disks) that you may want to look for:

Services and applications that can prevent deactivating a snapshot volume or a clone LUN

https://support.emc.com/kb/29730

6 Posts

September 30th, 2013 04:00

Many thanks for this. I have used process explorer and it detects no active handles for the problem drive. I am having difficulty accessing the knowledge base article you provided but will continue to try to access this (email EMC for assistance).

4.5K Posts

September 30th, 2013 13:00

Maybe that can help.

Why is "admsnap deactivate" command failing with "0x3e05003f Session exists but not deactivated" error?

Article Number:000029028 Version:1

Impact

Why is  "admsnap deactivate" command failing with "0x3e05003f Session exists but not deactivated" error?

Issue

The admsnap deactivate command fails with error: 0x3E05003F Session exists but not deactivated.

Environment

Product: CLARiiON FC4700
Product: CLARiiON AX100

Product: CLARiiON CX400

Product: CLARiiON CX600

Product: CLARiiON CX500

Product: CLARiiON CX700

EMC SW: Admsnap 2.2.x

EMC SW: SnapView 2.10.06

OS: Microsoft Windows 2000

OS: Microsoft Windows Server 2003

Cause

Admsnap deactivate will not delete the drive letter if the volume is in use by services or applications on the host.

Microsoft Windows Management Instrumentation (WMI) service has an open handle on a LUN preventing deactivation of the snapshot session. WMI allows you to write scripts for the management of devices, user accounts, services, networking, and other aspects of a Windows system. Winmgmt.exe is the process file that must be stopped to free up the drive letter held open by WMI.

Change

Upgraded to Admsnap 2.2.0.0.14

Resolution

The latest revision of admsnap checks to make sure that no other process is using the drive before stripping away the drive letter. If a process is still using the drive, the drive letter will not be stripped away as previous revisions of admsnap did. Since this is a Windows operating system, you can run third-party utilities that will tell you which process has an open handle on that drive.  For example, one such utility can be found at:

http://www.sysinternals.com/ntw2k/freeware/handle.shtml

If you install and run this utility, it will identify the processes that have an open handle on the drive in question. Those processes must be stopped before admsnap deactivate can remove the drive letter.  Issue the "net stop winmgmt" CLI command to stop the WMI service and release the drive letter. Finally, attempt to deactivate the SnapView session. If running a script, you can place the command in the script.

See also solution 29730 ("Services and applications that can prevent deactivating a snapshot volume").

Notes

Refer to solution 28637 for this same issue on other operating systems.  This also happens when using the admclone_deactivate. Solution 28637 also describes how to use the debug tool in admclone_deactivate and admsnap deactivate to identify what has the open handle on the drive in question.

glen

6 Posts

October 4th, 2013 00:00

Many thanks to everyone for their useful comments. I haven't marked any as the correct answer yet as I have been using combinations of the suggestions to try and resolve things. There does not seem to be any active handles which are preventing snapshot deactivation.

I have looked at the article recommended below and found this useful. Although it didn't specify to do so, I have disabled monitoring of this server using Dell IT Assistant. This uses SNMP to monitor resource such as disk space etc and I thought this may have contributed to the problem. So far the snapshot has deactivated correctly (only once since I made the change) but fingers crossed this has resolved things

Services and applications that can prevent deactivating a snapshot volume or a clone LUN

https://support.emc.com/kb/29730

No Events found!

Top