Firestreamer and Win32 API: CreateFile and PrepareFile
Posted: 27 Nov 2012, 01:15
Hi all,
I'm trying to use Firestreamer as a way to facilitate the development of a backup feature in our software, so I don't need to use a real tape library every time.
To develop this feature, I'm using two main Windows API methods until now: CreateFile and PrepareTape of the windows API.
Well, I won't go in details about the API usage because I know that this isn't the place for it but, instead of it, I'd like to understand better the behavior of Firestreamer.
Basically, the problem that I'm facing now is: I can instantiate the tape "handler" through the CreateFile method, where I use the tape symbolic name that I get via Device Manager in a patter like "\\.\Tape1". Until there, OK.
The problem is, when I call the second method, Windows give me an error saying that the media isn't OK. What is interesting is that, inside Firestreamer, in the Activity tab, 2 messages are displayed:
11/26/2012 22:33:19 | Error | E025 | L1T001 | Unable to insert the medium [] into a tape drive: The medium URI prefix is invalid. | |
11/26/2012 22:33:19 | Error | E010 | L1T001 | Unable to read data from the medium. | |
OK, so from it I understand that as I'm specifying only the Tape name, but not the tape cartridge identification (the medium, in this case), Firestreamer (or maybe any tape library engine, I'm far from an expert in this subject) doesn't understand which medium it should use to write my data.
Based on this line of thought, my doubts are:
1. Is there a format that allows me to specify, in the Windows Format, which medium to use? Or
2. Is there a way I can configure Firestreamer so it behaves as a single single tape drive and not a tape library? I mean, it always will have only one tape drive that will always have one medium inside it, so I don't have to "tell it" to load the tape before I can read/write to it?
I hope I could make my question clear.
Thhank you in advance,
Filipe
I'm trying to use Firestreamer as a way to facilitate the development of a backup feature in our software, so I don't need to use a real tape library every time.
To develop this feature, I'm using two main Windows API methods until now: CreateFile and PrepareTape of the windows API.
Well, I won't go in details about the API usage because I know that this isn't the place for it but, instead of it, I'd like to understand better the behavior of Firestreamer.
Basically, the problem that I'm facing now is: I can instantiate the tape "handler" through the CreateFile method, where I use the tape symbolic name that I get via Device Manager in a patter like "\\.\Tape1". Until there, OK.
The problem is, when I call the second method, Windows give me an error saying that the media isn't OK. What is interesting is that, inside Firestreamer, in the Activity tab, 2 messages are displayed:
11/26/2012 22:33:19 | Error | E025 | L1T001 | Unable to insert the medium [] into a tape drive: The medium URI prefix is invalid. | |
11/26/2012 22:33:19 | Error | E010 | L1T001 | Unable to read data from the medium. | |
OK, so from it I understand that as I'm specifying only the Tape name, but not the tape cartridge identification (the medium, in this case), Firestreamer (or maybe any tape library engine, I'm far from an expert in this subject) doesn't understand which medium it should use to write my data.
Based on this line of thought, my doubts are:
1. Is there a format that allows me to specify, in the Windows Format, which medium to use? Or
2. Is there a way I can configure Firestreamer so it behaves as a single single tape drive and not a tape library? I mean, it always will have only one tape drive that will always have one medium inside it, so I don't have to "tell it" to load the tape before I can read/write to it?
I hope I could make my question clear.
Thhank you in advance,
Filipe