The tapedrive-with-changer on the homeserver found itself in a wedged state
with at the bottom of the
dmesg output:
[105715.017656] ch 0:0:1:1: Attempting to queue a TARGET RESET message
[105715.017658] CDB: 0x1b 0x20 0x0 0x0 0x2 0x0
[105715.017663] ch 0:0:1:1: Command not found
[105715.017664] aic7xxx_dev_reset returns 0x2002
[105718.936191] target0:0:1: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 15)
And still no access to the scsi tape drive. But, there is a bigger hammer
nowadays named
sg_reset which can fix this:
# mt -f /dev/nst0 status
/dev/nst0: Input/output error
# sg_reset -b /dev/sg0
sg_reset: starting bus reset
sg_reset: completed bus reset
# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x25 (DDS-3).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
and it's back, not needing a reboot. The list of options says it all:
Usage: sg_reset [-b] [-d] [-h] [-V] DEVICE
where: -b attempt a SCSI bus reset
-d attempt a SCSI device reset
-h attempt a host adapter reset
-V print version string then exit
{if no switch given then check if reset underway}
To reset use '-d' first, if that is unsuccessful, then use '-b', then '-h'