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.
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
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.
Periyakaruppan N (Peri),
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.
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.
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):
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