Legacy Tape Drive DSFs
Legacy tape drive DSFs reside in the
/dev/rmt/
directory and encode bus/target/LUN addresses just like legacy disk and LUN DSFs. However, unlike LUNs, tape drives often support numerous access options in the
[options]
portion of the device file name. The DSF below accesses the tape drive located at bus instance 0, target 0, LUN 0 using the best density and compression features supported by the tape drive.
/dev/rmt/c0t0d0BEST
Note that the
stape
kernel driver doesn’t support block mode access to tape drives, so there isn’t a
/dev/mt/
device file directory.
Persistent Tape Drive DSFs
Much like persistent LUN DSFs, persistent tape drive DSFs encode the device’s agile view hardware address instance number. However, persistent tape drive DSFs reside in the
/dev/rtape/
directory, and the DSF names include prefix
tape
rather than
disk
. The DSF below accesses the tape drive with instance number 0 using the best density and compression features supported by the tape drive.
/dev/rtape/tape0_BEST
Note that the
estape
kernel driver doesn’t support block mode access to tape drives, so there isn’t a
/dev/tape/
device file directory.
Tape Drive DSF Options
Unlike LUN DSFs, tape drive DSFs often support numerous access options via the
[options]
portion of the DSF name. Common options, which are supported on both legacy and persistent DSFs, include:
w
Immediate report disabled. A write request waits until the data are written on the medium.
density
Specifies the density or format used when writing to the tape. 11i v3 only supports the
BEST
density. 11i v1 and v2 support several other formats. The list below only describes some of the common 11i v1 and v2 density formats. See the
mt(7)
man page for a complete list.
BEST
Use the highest available density/compression features available
NOMOD
Maintain the density/compression features used previously on the tape
DDS1
Use DDS1 format to ensure compatibility with older DDS1 tape drives
DDS2
Use DDS2 format to ensure compatibility with older DDS2 tape drives
C[n]
Write data in compressed mode, on tape drives that support data compression. Compression is automatically enabled when the density field is set to
BEST
.
n
No rewind on close. Unless this mode is requested, the driver automatically rewinds the tape when closed.
b
Specifies Berkeley-style tape mode. When the
b
is absent, the tape drive follows AT&T-style behavior.
When a file is closed after servicing a read request, if the no-rewind bit is not set, the tape drive automatically rewinds the tape. If the no-rewind bit is set, the behavior depends on the style mode. For AT&T-style devices, the tape is positioned after the EOF following the data just read (unless already at BOT or Filemark). For Berkeley-style devices, the tape is not repositioned in any way.
w
Writes wait for physical completion of the operation before returning status. The default buffered mode or immediate reporting mode) requires the tape device to buffer the data and return immediately with successful status.
See the examples on the slide and the
mksf(1m)
man page for more information.
9.x Compatibility
Prior to version HP-UX 10.01, tape drive DSFs followed an entirely different naming convention:
/dev/rmt/0m
First tape drive on the system
/dev/rmt/1m
Second tape drive on the system
/dev/rmt/2m
Third tape drive on the system
/dev/rmt/2mn
Third tape drive on the system, "no-rewind" feature enabled
/dev/rmt/2mnb
Third tape drive, "no-rewind" feature and Berkeley semantics enabled
Each DSF name includes an instance number to distinguish the DSF from all other tape drive DSFs, the letter "m", and a series of access options as described previously.
11i v1, v2, and v3 automatically create the following tape drive DSFs, but they are simply links to equivalent legacy
cxtxdxBEST
DSFs.
/dev/rmt/0m
links to
/dev/rmt/cxtxdxBEST
/dev/rmt/0mn
links to
/dev/rmt/cxtxdxBESTn
/dev/rmt/0mb
links to
/dev/rmt/cxtxdxBESTb
/dev/rmt/0mnb
links to
/dev/rmt/cxtxdxBESTnb
rmt 11.13及之前的名称
rac 11.31的名称