Unable to label brand new 3592JE media
Brand new 3592JE media, when loaded into IBM TS1160 tape drive needs around 200 seconds to perform "media characterization".
This is not properly handled by the castor-tape-label utilty, the process end with error:
Failed to test unit ready after waiting 60 seconds: SCSI error in testUnitReady: status=0x2 host_status=0 driver_status=0x8: SCSI command failed with status CHECK CONDITION: Sense Information: Not Ready: Logical unit is in process of becoming ready
The problem is that the tape is not at BOT within those at least 150 seconds:
[root@tpsrv209 ~]# tape-mount -V I70204 ; mt stat ; date ; sleep 175 ; mt stat ; date
2019-06-27 15:53:47 tape-mount [INFO] - mount of tape I70204 inside drive I3601443: OK
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (10000):
IM_REP_EN
Thu Jun 27 15:53:47 CEST 2019
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (10000):
IM_REP_EN
Thu Jun 27 15:56:42 CEST 2019
However, it is positioned at BOT within 200 seconds:
[root@tpsrv209 ~]# tape-mount -V I70201 ; mt stat ; date ; sleep 200 ; mt stat ; date
2019-06-27 15:36:49 tape-mount [INFO] - mount of tape I70201 inside drive I3601443: OK
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (10000):
IM_REP_EN
Thu Jun 27 15:36:49 CEST 2019
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x57 (no translation).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
Thu Jun 27 15:40:09 CEST 2019
[root@tpsrv209 ~]# tape-unmount
2019-06-27 15:42:02 tape-unmount [INFO] - unmount of tape I70201 from drive I3601443: OK
Cheers,
Vlado