728x90


Question

Each variant of UNIX has its own method for naming tape devices. This document details how many different platforms define their tape devices.

Answer

Under UNIX, magnetic tape drives are given individual numbers, starting from zero. Tape drives are accessed by means of a device special file located in the /dev directory. These device special files appear to the user as normal files, which can be opened, read from and written to. All operations you would do on a normal file can be done on a special file. The only difference is that the data in the file resides on the tape loaded in the drive, not on the filesystem. In addition, because there are different ways of physically writing data to a tape (for example, low or high density), there are several different files that correspond to the same tape drive. Each variant of UNIX has its own naming convention for the tape drives. This document covers the Sun, HP, AIX, DEC, Linux, SGI, SCO, and Unixware operating systems. 
SUN
On Sun operating systems, the tape devices are defined in /dev/rmt. Device names begin with device number followed by a letter designating density and compression:

h = high
m = medium
l = low
c = compression
u = ultra-compression
n = for no-rewind

Run man st to see the man page on the SCSI tape interface. Also see the "FILES" section of the man pages for man mt.

Examples:
Device Name Description
/dev/rmt/0 Tape drive 0, auto-rewind
/dev/rmt/0n Tape drive 0, no auto-rewind
/dev/rmt/0cn Tape drive 0, compression, no auto-rewind

HP
On HP operating systems, the tape devices are defined in /dev/rmt. Device names begin with a device number followed by a letter designating density (h = high, m = medium, l = low), then have an optional "c" for compression and/or an "n" for no-rewind. Run man 7 mt to see the man page on the magnetic tape interface.

Examples:
Device Name Description
/dev/rmt/0 Tape drive 0, auto-rewind
/dev/rmt/0n Tape drive 0, no auto-rewind
/dev/rmt/0mn Tape drive 0, medium density, no auto-rewind

AIX
On IBM AIX operating systems, the tape devices are defined in /dev. Device names begin with "rmt", are followed by a device number followed by an optional period and a number suffix to indicate density and rewind options (See table for details):
Special File Name Rewind-on-Close Retension-on-Open Bytes per Inch
/dev/rmt* Yes No Density setting #1
/dev/rmt*.1 No No Density setting #1
/dev/rmt*.2 Yes Yes Density setting #1
/dev/rmt*.3 No Yes Density setting #1
/dev/rmt*.4 Yes No Density setting #2
/dev/rmt*.5 No No Density setting #2
/dev/rmt*.6 Yes Yes Density setting #2
/dev/rmt*.7 No Yes Density setting #2

Examples:
Device Name Description
/dev/rmt0 Tape drive 0, auto-rewind
/dev/rmt0.1 Tape drive 0, no auto-rewind

The values of density setting #1 and density setting #2 come from tape drive attributes that can be set using SMIT. Typically density setting #1 is set to the highest possible density for the tape drive while density setting #2 is set to a lower density. However, density settings are not required to follow this pattern. The density value (bytes per inch) is ignored when using a magnetic tape device that does not support multiple densities. For tape drives that do support multiple densities, the density value only applies when writing to the tape. When reading, the drive defaults to the density at which the tape is written. 

Run man rmt to see the man pages on the "rmt" interface.

LINUX
Tape devices under Linux the operating have different names depending on the type of tape involved. The most common sort of tape (SCSI Tape) will have a device name of 'st'. 
For example, the first SCSI tape has the following device special files:

Examples:
Device Name Description
/dev/st0 SCSI-tape 0, auto-rewind
/dev/nst0 SCSI-tape 0, no auto-rewind
/dev/rft0 Floppy tape 0, auto-rewind
/dev/nrft0 Floppy tape 0, no auto-rewind

One major difference with Linux devices and other operating systems is that the density code is not used on Linux. If you want to write a tape with a density other than the default (usually highest) density then you may need to use the mt command with the densities or set densities arguments to set the density of the device. Read operations usually do not need the density setting explicitly, as this will be automatically picked up. 

DEC
With DEC operating system tape devices, you cannot tell what the target number and SCSI bus number is for a tape device given just its name. The device name will also have other modifiers that determine things like whether the tape rewinds after use, and what density and compression settings are used on the tape. 

Tape device format:
/dev/{device type}{device number}{density/compression flag} 

{device type} rmt = Auto-rewind device, nrmt = Non-auto-rewind device
{device number} Tape device numbers start at 0. They only signify what order the device files were created in, not what SCSI bus they are attached to, or what their target id is.
{density/compression flag} Tape drives are capable of writing at multiple byte per inch densities, and some of them can use data compression hardware to compress the data before it is written to the tape. The following is a list of known flags:
h = high density / compressing device
m = medium density / compressing device
l = low density / compressing device
a = another density (QIC format drives only)

Examples:
Device Name Description
/dev/rmt0 Tape drive 0, auto-rewind
/dev/nrmt0 Tape drive 0, no auto-rewind
/dev/rmt0h Tape drive 0, auto-rewind, high density
/dev/nrmt0l Tape drive 0, no auto-rewind, low density
/dev/rmt0a Tape drive 0, auto-rewind, another density (QIC format drives only)

The density designation depends very much on the drive hardware. Running man tz gives the following information:

TLZ06: Single-density drive, compaction support.
rmt?a 61000 BPI
rmt?l 61000 BPI
rmt?m 61000 BPI, compaction turned on.
rmt?h 61000 BPI, compaction turned on.

SGI
On SGI operating systems, the tape devices are defined in /dev/rmt. Device names typically begin with an interface type, usually "tps" for tape-SCSI, followed by an interface number, a "d", a device number, and then a series of optional flags: 

nr = no-rewind
ns = no-byte-swap
v = variable record length

Run man tps to see the man pages on the SCSI tape interface.

Examples:
Device Name Description
/dev/rmt/tps0d3 SCSI-tape 0, device 3, auto-rewind
/dev/rmt/tps0d3nr SCSI-tape 0, device 3, without auto-rewind
/dev/rmt/tps0d2nrnsv SCSI-tape 0, device 2, non-rewind, no-byte-swap, variable record length

SCO
Examples:
Device Name Description
/dev/rct0 Tape drive 0, auto-rewind
/dev/nrct0 Tape drive 0, no auto-rewind

UNIXWARE
The tape drive device files are defined in /dev/rmt/*

Examples:
Device Name Description
/dev/rmt/ctape1 Tape drive 1, auto-rewind, non-retensioning
/dev/rmt/ntape1 Tape drive 1, no auto-rewind, non-retensioning
/dev/rmt/rtape1 Tape drive 1, auto-rewind, retensioning
/dev/rmt/nrtape1 Tape drive 1, auto-rewind, retensioning
/dev/rmt/utape1 Tape drive 1, unload on close


http://www-01.ibm.com/support/docview.wss?uid=swg21660675&myns=swgimgmt&mynp=OCSSGU8G&mync=E


728x90

+ Recent posts