2 Chapter 27. Virtual Tape API
3 Prev Part V. Technical Background Next
5 -------------------------------------------------------------------------------
7 Chapter 27. Virtual Tape API
15 The upper level Amanda code (including some of the other tape_xxx routines)
16 calls the following routines which implement a virtual tape table:
18 * int tape_access(filename, mode) Acts like access(2) on possibly virtual
20 * int tape_open(filename, mode) Acts like open(2) on possibly virtual devices
21 * int tape_stat(filename, buf) Acts like stat(2) on possibly virtual devices
22 * int tapefd_close(tapefd) Acts like close(2) on possibly virtual devices
23 * int tapefd_fsf(tapefd, count) Forward skips the (possibly virtual) device.
24 * int tapefd_read(tapefd, buffer, count) Reads a block from the (possibly
26 * int tapefd_rewind(tapefd) Reads a block from a (possibly virtual) device.
27 * void tapefd_resetofs(tapefd) Uses lseek() tricks to reset the write/read
28 offset counter on a virtual tape device.
29 * int tapefd_unload(tapefd) Unloads the media from a (possibly virtual) device.
30 * int tapefd_status(tapefd) pr- ints status of the (possibly virtual) device to
32 * int tapefd_weof(tapefd, count) writes a filemark/moves to the next file on a
34 * int tapefd_write(tapefd, buffer, count) writes a block of data to a (possibly
37 For a tape type xxx, the following routines must be provided, and entered -
38 into the table "vtable" in tape-src/tapeio.c:
40 * int xxx_tape_access(filename, mode)
41 * int xxx_tape_open(filename, mode)
42 * int xxx_tape_stat(filename, buf)
43 * int xxx_tapefd_close(xxx_tapefd)
44 * int xxx_tapefd_fsf(xxx_tapefd, count)
45 * int xxx_tapefd_read(xxx_tapefd, buffer, count)
46 * int xxx_tapefd_rewind(xxx_tapefd)
47 * void xxx_tapefd_resetofs(xxx_tapefd)
48 * int xxx_tapefd_unload(xxx_tapefd)
49 * int xxx_tapefd_status(xxx_tapefd)
50 * int xxx_tapefd_weof(xxx_tapefd, count)
51 * int xxx_tapefd_write(xxx_tapefd, buffer, count)
53 Along with a prefix string which will identify the type. The initial vtape
54 layer has two types "plain" and "rait" (Redundant Array of Inexpensive Tapes)
55 but we hope to add a "rmt" (remote tape client), and possibly "dvd" types soon.
59 Refer to http://www.amanda.org/docs/vtape-api.html for the current version of
61 -------------------------------------------------------------------------------
64 Chapter 26. Amanda Security API Home Chapter 28. Using Kerberos with Amanda