#89401 amanda needs special patch to run with onstream tape DI-30

Package:
amanda-server
Source:
amanda
Description:
Advanced Maryland Automatic Network Disk Archiver (Server)
Submitter:
Flynn Marquardt
Date:
2005-07-18 03:07:28 UTC
Severity:
wishlist
#89401#5
Date:
2001-03-12 15:29:01 UTC
From:
To:
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