Linux tapes,what is l a and m at end of tape devices in dev?

From Documentation/scsi/st.txt:

The system manager (root) can define default values for some tape parameters, like block size and density using the MTSETDRVBUFFER ioctl. These parameters can be programmed to come into effect either when a new tape is loaded into the drive or if writing begins at the beginning of the tape. The second method is applicable if the tape drive performs auto-detection of the tape format well (like some QIC-drives). The result is that any tape can be read, writing can be continued using existing format, and the default format is used if the tape is rewritten from the beginning (or a new tape is written for the first time). The first method is applicable if the drive does not perform auto-detection well enough and there is a single "sensible" mode for the device. An example is a DAT drive that is used only in variable block mode (I don't know if this is sensible or not :-).

The user can override the parameters defined by the system manager. The changes persist until the defaults again come into effect.

By default, up to four modes can be defined and selected using the minor number (bits 5 and 6). The number of modes can be changed by changing ST_NBR_MODE_BITS in st.h. Mode 0 corresponds to the defaults discussed above. Additional modes are dormant until they are defined by the system manager (root). When specification of a new mode is started, the configuration of mode 0 is used to provide a starting point for definition of the new mode.

Using the modes allows the system manager to give the users choices over some of the buffering parameters not directly accessible to the users (buffered and asynchronous writes). The modes also allow choices between formats in multi-tape operations (the explicitly overridden parameters are reset when a new tape is loaded).

The suffixes are mapped to modes: mode #0 has no suffix, and the other 3 are l, m, and a.

There is also some information about this in the st manpage:

Within each group, four minor numbers are available to define devices with different characteristics (block size, compression, density, etc.) When the system starts up, only the first device is available. The other three are activated when the default characteristics are defined (see below).

and:

The default options for a tape device are set with MT_ST_DEFBOOLEANS. A nonactive tape device (e.g., device with minor 32 or 160) is activated when the default options for it are defined the first time. An activated device inherits from the device activated at start-up the options not set explicitly.

It is possible to recompile the driver to support up to 16 modes, in which case the letter sequence is expanded to blank, r, k, s, l, t, o, u, m, v, p, x, a, y, q, z. I am curious if there is any meaning behind those particular letters in those particular order, but I couldn't find it. :) Here's where it was introduced, anyway.


  • l: low density (guessing disable hardware compression?)
  • m: "medium density"(guessing enable hardware compression?)
  • a: ?, Someone once said it meant 'append', aka "dont rewind before writing"

from https://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands/

Tape device names on Unix

  1. /dev/rmt/0 or /dev/rmt/1 or /dev/rmt/[0-127] : Regular tape device name on Unix. The tape is rewound.
  2. /dev/rmt/0n : This is know as no rewind i.e. after using tape, leaves the tape in current status for next command.
  3. /dev/rmt/0b : Use magtape interface i.e. BSD behavior. More-readable by a variety of OS’s such as AIX, Windows, Linux, FreeBSD, and more.
  4. /dev/rmt/0l : Set density to low.
  5. /dev/rmt/0m : Set density to medium.
  6. /dev/rmt/0u : Set density to high.
  7. /dev/rmt/0c : Set density to compressed.
  8. /dev/st[0-9] : Linux specific SCSI tape device name.
  9. /dev/sa[0-9] : FreeBSD specific SCSI tape device name.
  10. /dev/esa0 : FreeBSD specific SCSI tape device name that eject on close (if capable).

Tags:

Linux

Tape