Highlighted
2 Bronze

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.

Labels (1)
0 Kudos
12 Replies
Highlighted
7 Thorium

Re: Cannot deactivate admsnap session

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

0 Kudos
Highlighted
2 Bronze

Re: Cannot deactivate admsnap session

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

0 Kudos
Highlighted
7 Thorium

Re: Cannot deactivate admsnap session

yep

0 Kudos
2 Bronze

Re: Cannot deactivate admsnap session

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

0 Kudos
Highlighted
7 Thorium

Re: Cannot deactivate admsnap session

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

0 Kudos
Highlighted
3 Argentum

Re: Cannot deactivate admsnap session

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),

0 Kudos
Highlighted
4 Ruthenium

Re: Cannot deactivate admsnap session

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.

0 Kudos
Highlighted
2 Bronze

Re: Cannot deactivate admsnap session

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

0 Kudos
Highlighted
4 Ruthenium

Re: Re: Cannot deactivate admsnap session

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 😧

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