none
Alternative to the Removable Storage Manager API (RSM)

    Question

  • Firstly, I apologise if this thread isn't in the correct location, but it looked like the best fit I could find....

    I've written an application that uses the Removable Storage Manager API to read/write to tape drives, however I see that this API is no longer available in Windows Server 2008 R2. Please could you advise if there is a new or alternative API available to access tape drives on Windows Server 2008 R2? Or are tape drives simply not supported anymore?

    Thanks
    Ben
    Tuesday, October 27, 2009 11:41 AM

Answers

  • Hi Ben,

    The decision to remove RSM from Win7 was taken in vista time only when it was first made optional component for WS 2008.

    Only NTBackup used to use RSM APIs when this decision to deprecate RSM was made and the expectations were made clear that the custom apps will have to take care of not using RSM anymore.

    The tape drive management solution is not supported and there is no alternative OS API available to access tape drives on Windows Server 2008 R2.

    But there are inbox tape drivers and changer drivers via which tapes can be accessed (through IOCTLs).


    Thanks
    Munish
    Wednesday, October 28, 2009 6:15 AM
  • Yes, you can use Tape drives and Changers in Win2008 R2 using the DeviceIoControl() function using control codes , i.e. via all the standard IOCTLS which were available in downlevel OS.

    Thanks
    MUnish [MSFT]
    Thursday, October 29, 2009 12:16 PM

All replies

  • Hi Ben,

    RSM has been deprecated in Win7. The tape drives are not supported and there is no alternative OS API available to access tape drives on Windows Server 2008 R2.

    Thanks
    Sandeep [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights
    Wednesday, October 28, 2009 6:09 AM
  • Hi Ben,

    The decision to remove RSM from Win7 was taken in vista time only when it was first made optional component for WS 2008.

    Only NTBackup used to use RSM APIs when this decision to deprecate RSM was made and the expectations were made clear that the custom apps will have to take care of not using RSM anymore.

    The tape drive management solution is not supported and there is no alternative OS API available to access tape drives on Windows Server 2008 R2.

    But there are inbox tape drivers and changer drivers via which tapes can be accessed (through IOCTLs).


    Thanks
    Munish
    Wednesday, October 28, 2009 6:15 AM
  • Thanks Sandeep and Munish for your replies.

    It seems strange that Tape drives are no longer supported in Windows Server 2008, as tape drives are still used extensively by large organisations such as banks.

    Munish, when you say "But there are inbox tape drivers and changer drivers via which tapes can be accessed (through IOCTLs)", is this interface standard, or would I have to write different code for different manufacturers drives?

    Thanks
    Ben
    Wednesday, October 28, 2009 11:29 AM
  • Hi Munish

    So just to check that I understand correctly, are you saying that I can still use Tape drives and Changers using the DeviceIoControl() function using control codes such as the following?

    IOCTL_TAPE_CREATE_PARTITION

    IOCTL_TAPE_ERASE

    IOCTL_TAPE_GET_DRIVE_PARAMS

    IOCTL_TAPE_GET_MEDIA_PARAMS

    IOCTL_TAPE_GET_POSITION

    IOCTL_TAPE_GET_STATUS

    IOCTL_TAPE_OLD_SET_MEDIA_PARAMS

    IOCTL_TAPE_PREPARE

    IOCTL_TAPE_SET_DRIVE_PARAMS

    IOCTL_TAPE_SET_MEDIA_PARAMS

    IOCTL_TAPE_SET_POSITION

    IOCTL_TAPE_WRITE_MARKS

     

    And for changers there are these:

    IOCTL_CHANGER_EXCHANGE_MEDIUM

    IOCTL_CHANGER_GET_ELEMENT_STATUS

    IOCTL_CHANGER_GET_PARAMETERS

    IOCTL_CHANGER_GET_PRODUCT_DATA

    IOCTL_CHANGER_GET_STATUS

    IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS

    IOCTL_CHANGER_MOVE_MEDIUM

    IOCTL_CHANGER_QUERY_VOLUME_TAGS

    IOCTL_CHANGER_REINITIALIZE_TRANSPORT

    IOCTL_CHANGER_SET_ACCESS

    IOCTL_CHANGER_SET_POSITION


    Will these work on Win2008 R2?

    Thanks
    Ben

    Wednesday, October 28, 2009 11:55 AM
  • Yes, you can use Tape drives and Changers in Win2008 R2 using the DeviceIoControl() function using control codes , i.e. via all the standard IOCTLS which were available in downlevel OS.

    Thanks
    MUnish [MSFT]
    Thursday, October 29, 2009 12:16 PM
  • Hi,

    Sorry if this is a little off topic, but it seems to be the only thread I can find where I might get an answer.

    If the tape drives can still be accessed via DeviceIoControl(), then why didn't Microsoft just port ntbackup away from RSM and use the alternative supported mechanism? I still don't understand why MS would want to break backup/restore compatibility for all of the users who have been faithful to their product. Not including or supporting ntbackup at all seems almost hostile towards the users.

    -John

    Wednesday, November 11, 2009 6:23 AM
  • Hi,

    I know this post is older, but I'm wondering if anyone else is trying to use tape libraries (changers) via IOCTL? I've tried to get it to work and asked around for help, but nobody seems to know answers or where thryu might be found.

    I can read/write the tape itself using standard Windows API calls, it's the changer that's the problem. The documentation for the various IOCTL_CHANGER commands is really minimal, and there does not appear to be any vendor support anymore (that I can find for free at least)

    If anyone has any suggestions where I can find WORKING sample code (in C, C++ or C#) I would appreciate the pointer. I need to be able to move the changer transport, load & unload the drive and get status on the changer. I would accept samples for DVD changers as well as long as they are using IOCTL command structure as it should be similar calls.

    Thanks!

    Dave

    • Proposed as answer by Samira [MSFT] Monday, November 8, 2010 9:37 AM
    Sunday, May 9, 2010 6:33 PM
  • hi,

    You can get a list of changer routines from the following locations.

    http://msdn.microsoft.com/en-us/library/ff551472(v=VS.85).aspx

    In addition if you want to understand more about mini class changer drivers you can read up the following link

    http://msdn.microsoft.com/en-us/library/ff559204(v=VS.85).aspx

    There are sample mini class drivers in located in the \src\storage directory of the  Windows Driver Kit (WDK).

    • Proposed as answer by Samira [MSFT] Monday, November 8, 2010 9:43 AM
    Monday, November 8, 2010 9:42 AM