The following patch is needed for amanda to work with a Onstream DI-30
(ATAPI tape, 15 GB raw capacity)
server-src/taper.c
1810,1812c1810,1821
< if(tapefd_weof(tape_fd, 1) == -1) {
< errstr = newstralloc2(errstr, "writing filemark: ", strerror(errno));
< return 0;
---
> /* The ide-tape patch issued by Onstream prefers (demands) that we
> close the device and reopen it instead of ioctl()ing the weof */
> tapefd_close(tape_fd);
> if((tape_fd = tape_open(tapedev, O_WRONLY)) == -1) {
> if(errno == EACCES) {
> errstr = newstralloc(errstr,
> "reopening device to weof: tape is write protected");
> } else {
> errstr = newstralloc2(errstr,
> "reopening device to weof: ", strerror(errno));
> }
> return 0;
1813a1823
>
The problem is: for a debian package this should be a configuration
option, not a compile option, otherwise two packages are needed.
I'm not the author of the patch, I found it on a amanda-related
mailing list, but I can tell you it is needed and it works (otherwise
only the first file on the tape can be restored).
I use the following tapetype entry:
define tapetype ONSTREAM {
comment "Onstream DI-30"
length 22000 mbytes
filemark 2000 kbytes
speed 1500 kbytes
}
Flynn