04 July 2012

DPM 2010 eject tape (or Windows 2008 eject tape)

As you probably figured out that Windows Server 2008 backup software doesn’t support tapes. So if you use Microsoft Data Protection Manager 2010 or some other tape compatible software and don’t see the place to eject tape programmatically, you are in the right place. Here comes the solution.

First of all you need a piece of software to support devio controls. I found a little one on http://www.ltr-data.se/files/devioctl.zip. This zip file contains devioctl.exe, which needs to be placed in windows directory.

To try the eject functionality, you need a test script as a .bat file containing the following line:

devioctl.exe eject \\.\Tape2147483645

The last number can be found out in DPM shell using the following command:

get-dpmlibrary -dpmservername yourdpmservernamehere | get-tapedrive | ft acc*

The result is in my case:

image

It seems, like I have two drives. In fact I have only one, the other one was the old one, which was replaced to the new drive. So I will use the line with the lowest number.

If you are wondering, what’s the deal with this strange number, you can put it to windows calculator and look at the binary representation of this number:

image

So if you look at bits 31..0, then 2147483646 is in some interpretation -1, 2147483645 means -2 etc.

No comments:

Post a Comment