[pbs-devel] [PATCH 00/11] Userspace tape driver

Dietmar Maurer dietmar at proxmox.com
Wed Apr 7 12:22:57 CEST 2021


This is a userspace drive implementation using SG_IO.

Why we do not use the Linux tape driver anymore, because:

- missing features (MAM, Encryption, ...)

- strange permission handling - only root (or CAP_SYS_RAWIO) can
   do SG_IO (SYS_RAW_IO)

- unability to detect EOT (you just get EIO)


Dietmar Maurer (11):
  tape: introduce trait BlockRead
  tape: introduce trait BlockWrite
  tape: implement LTO userspace driver
  tape: implement format/erase
  tape: fix LEOM handling
  tape: make fsf/bsf driver specific
  tape: make sure there is a filemark at the end of the tape
  sgutils2: add scsi_mode_sense helper
  tape: correctly set/display drive option
  tape: pmt - re-implement fsr/bsr
  tape: pmt - re-implement lock/unlock command

 debian/proxmox-backup-server.udev       |  18 +
 src/api2/config/changer.rs              |   4 +-
 src/api2/config/drive.rs                |  44 +-
 src/api2/tape/changer.rs                |   4 +-
 src/api2/tape/drive.rs                  |  65 +--
 src/api2/tape/mod.rs                    |   4 +-
 src/api2/types/tape/drive.rs            |  34 +-
 src/bin/pmt.rs                          | 347 +++---------
 src/bin/pmtx.rs                         |   4 +-
 src/bin/proxmox-tape.rs                 |  17 +-
 src/bin/proxmox_tape/drive.rs           |   8 +-
 src/bin/sg-tape-cmd.rs                  | 189 +------
 src/config/drive.rs                     |  18 +-
 src/tape/changer/mod.rs                 |   4 +-
 src/tape/drive/linux_tape.rs            | 173 ++++--
 src/tape/drive/lto/mod.rs               | 474 ++++++++++++++++
 src/tape/drive/lto/sg_tape.rs           | 720 ++++++++++++++++++++++++
 src/tape/drive/mod.rs                   |  53 +-
 src/tape/drive/virtual_tape.rs          | 116 ++--
 src/tape/file_formats/blocked_reader.rs |  70 ++-
 src/tape/file_formats/blocked_writer.rs |  37 +-
 src/tape/helpers/emulate_tape_reader.rs |  64 +--
 src/tape/helpers/emulate_tape_writer.rs |  37 +-
 src/tape/linux_list_drives.rs           |  51 +-
 src/tape/pool_writer/mod.rs             |   2 +-
 src/tape/tape_read.rs                   |  35 +-
 src/tape/tape_write.rs                  |  61 +-
 src/tools/sgutils2.rs                   | 125 +++-
 www/Utils.js                            |   2 +-
 www/tape/DriveStatus.js                 |   8 +-
 www/tape/window/Erase.js                |   4 +-
 31 files changed, 1939 insertions(+), 853 deletions(-)
 create mode 100644 debian/proxmox-backup-server.udev
 create mode 100644 src/tape/drive/lto/mod.rs
 create mode 100644 src/tape/drive/lto/sg_tape.rs

-- 
2.20.1





More information about the pbs-devel mailing list