SCSI Tape hangs when no tape loaded (2.5.6x)
Kai,
That did it !
I was running mt-st-0.5b, upgrading to 0.7 fixed the 'mt' command as well as the 'stinit' command which caused my boot to delay for 2 minutes as that was called from the boot scripts.
THanks
Quoted 26 lines · Ruud Linders
Quoted 11 lines
On both 2.5.60 and 2.5.61 when there is no tape loaded in my SCSI DAT tape drive, access to the drive blocks for exactly 2 minutes before timing out and giving an I/O error.
# mt stat ....... < 2 minutes later > ... /dev/tape: Input/output errorDoes you mt open the tape device with the
O_NONBLOCKoption? If not, this is what is expected. mt-st version >= 0.6 does use this option. I don't know about other mt's.The
open()behaviour of st was changed at 2.5.3 to conform with SUS (blocking) and what the other Unices do (timeout). If the device is opened withoutO_NONBLOCK, the driver waits for some time (default 2 minutes) for the device to become ready. If it does not become ready, an error is returned.Kai
P.S. I just tested 2.5.61 and in my system 'mt status' without tape in the drive works as expected (i.e., prints status immediately).