LSTAPE(8)

NAME
lstape - list tape devices.

SYNOPSIS

lstape
    [-h|--help] [--scsi-only|--ccw-only] [-v|--version] [-V|--verbose]
    [--online|--offline] [-s]
    [-t <device-type>[,<device-type>]...]
    [<device-bus-ID>...]

DESCRIPTION
The lstape command lists all available tape devices on the current host. For channel attached tape devices this output is the same as the contents of /proc/tapedevices (which is obsolete) but also includes offline devices. By default all tape devices are displayed. The lstape command without the --ccw-only option causes extra SAN traffic for each SCSI tape or changer device by invoking the sg_inq command.

OPTIONS

-h or --help
    Print help text.

-v or --version
    Print the version of the s390-tools package and the command.

-V or --verbose
    Adds additional information that does not fit into a single line of output. This is currently only used for SCSI devices.

--scsi-only|--ccw-only
    Limit output to either SCSI or channel attached tape devices. The output without SCSI devices is the same as it was with previous versions of this command.

-s|--shortid
    Using this option will list only tape devices that are in channel subsystem 0, with subchannel set 0. All other devices will be suppressed and the leading "0.0." for bus IDs of the remaining devices will be removed. Since this is specific to CCW devices this option has no effect on the output of SCSI tape devices.

--online|--offline
    Limit output to either online or offline devices. This filter has no effect on the output of SCSI devices.

<device-bus-ID>
    Limits the output to information about the specified tape device or devices only. For CCW-attached devices only.

OUTPUT FIELDS FOR SCSI TAPE/CHANGER DEVICES

Generic
    SCSI generic device file for the tape drive, for example /dev/sg0. "N/A" if the SCSI generic (sg) kernel functionality is not available.

Device
    Main character device node file for accessing the tape drive or medium changer. SCSI tape devices are only visible if they are known to the SCSI layer. There are at least two possible drivers that can claim a SCSI tape device. The lstape command tries to determine the device driver. For the generic tape and changer driver the device names start with "st" or "sch", while for the IBM tape driver this would be "IBMtape" or "IBMchanger". If "N/A" is shown, the device driver could not be determined.

Target
    Linux SCSI device name in H:C:T:L format.

Vendor
    The vendor field from the SCSI device.

Model
    The model field from the SCSI device.

Type
    "tapedrv" for a tape drive or "changer" for a medium changer.

State
    The state of the SCSI device object in the kernel. Any state other than "running" can indicate problems.

For SCSI devices, the --verbose option additionally displays:

HBA The device bus-ID of the FCP device or of the virtio-scsi-ccw virtual HBA through which the tape drive is attached. "N/A" if the device does not have a sysfs ancestor with subsystem ccw.

WWPN
    The WWPN (worldwide port name) of the tape drive in the SAN. "N/A" if device is not attached through zfcp.

Serial
    The serial number. "NO/INQ" if there is no sg_inq command available. "NO/SG" if no SCSI generic (sg) kernel support is available.

EXAMPLES
lstape
    List all tape devices that are available
lstape --ccw-only --online
    Show all channel-attached tape devices that are online.
lstape --scsi-only --verbose
    Show all SCSI tape or changer devices with maximum information.