tapes

Synopsis

/usr/sbin/tapes [-rroot_dir]

Description

devfsadm(1M) is now the preferred command for /dev and /devices and should
be used instead of tapes.

tapes creates symbolic links in the /dev/rmt directory to the actual tape
device special files under the /devices directory tree. tapes searches the kernel
device tree to see what tape devices are attached to the system. For
each equipped tape drive, the following steps are performed:

The /dev/rmt directory is searched for a /dev/rmt/n entry that is a symbolic link to the /devices special node of the current tape drive. If one is found, this determines the logical controller number of the tape drive.

The rest of the special devices associated with the drive are checked, and incorrect symbolic links are removed and necessary ones added.

If none are found, a new logical controller number is assigned (the lowest-unused number), and new symbolic links are created for all the special devices associated with the drive.

tapes does not remove links to non-existent devices; these must be removed
by hand.

tapes is run each time a reconfiguration-boot is performed, or when add_drv(1M)
is executed.

Notice to Driver Writers

tapes(1M) considers all devices with the node type DDI_NT_TAPE to be tape
devices; these devices must have their minor name created with a specific format.
The minor name encodes operational modes for the tape device and consists
of an ASCII string of the form [ l,m,h,c,u ][ b ][
n ].

The first character set is used to specify the tape density of
the device, and are named low (l), medium (m), high (h), compressed
(c), and ultra (u). These specifiers only express a relative density; it is
up to the driver to assign specific meanings as needed. For example,
9 track tape devices interpret these as actual bits-per-inch densities, where l
means 800 BPI, m means 1600 BPI , and h means 6250 BPI,
whereas 4mm DAT tapes defines l as standard format, and m, h,
c and u as compressed format. Drivers may choose to implement any or
all of these format types.

During normal tape operation (non-BSD behavior), once an EOF mark has been
reached, subsequent reads from the tape device return an error. An explicit
IOCTL must be issued to space over the EOF mark before the
next file can be read. b instructs the device to observe BSD behavior,
where reading at EOF will cause the tape device to automatically space
over the EOF mark and begin reading from the next file.

n or no-rewind-on-close instructs the driver to not rewind to the beginning
of tape when the device is closed. Normal behavior for tape devices
is to reposition to BOT when closing. See mtio(7I).

The minor number for tape devices should be created by encoding the
device's instance number using the tape macro MTMINOR and ORing in the
proper combination of density, BSD behavior, and no-rewind flags. See mtio(7I).

To prevent tapes from attempting to automatically generate links for a device,
drivers must specify a private node type and refrain from using the
node type string DDI_NT_TAPE when callingddi_create_minor_node(9F).

Options

The following options are supported:

-rroot_dir

Causes tapes to presume that the /dev/rmt directory tree is found under root_dir, not directly under /.

Errors

If tapes finds entries of a particular logical controller linked to different
physical controllers, it prints an error message and exits without making any
changes to the /dev directory, since it cannot determine which of the
two alternative logical to physical mappings is correct. The links should be manually
corrected or removed before another reconfiguration boot is performed.

Installing the xktape driver on a Sun Fire 4800, with the driver
controlling a SCSI tape (target 4 attached to an isp(7D) SCSI HBA) and
performing a reconfiguration-boot creates the following special files in /devices.