Fix missing volume statistics from LTO drives
The enterprise tape drives, such as TS1160, allow us to collect various statistics at the end of each mount.
For example:
[1682036670.616230000] Apr 21 02:24:30.616230 tpsrv472.cern.ch cta-taped: LVL="INFO" PID="22020" TID="27333" MSG="Logging mount general statistics" thread="TapeWrite" tapeDrive="I4600232" tapeVid="I75254" mountId="777819" driveManufacturer="IBM" driveType="0359260F" firmwareVersion="5894" serialNumber="00000754418A" mountTotalCorrectedWriteErrors="0" mountTotalUncorrectedWriteErrors="0" mountTotalWriteBytesProcessed="20815861760" mountTotalNonMediumErrorCounts="0"
[1682036670.640425000] Apr 21 02:24:30.640425 tpsrv472.cern.ch cta-taped: LVL="INFO" PID="22020" TID="27333" MSG="Logging drive statistics" thread="TapeWrite" tapeDrive="I4600232" tapeVid="I75254" mountId="777819" driveManufacturer="IBM" driveType="0359260F" firmwareVersion="5894" serialNumber="00000754418A" lifetimeDriveEfficiencyPrct="81.8898" lifetimeInterfaceEfficiency0Prct="50" lifetimeMediumEfficiencyPrct="95.2756" lifetimeReadEfficiencyPrct="91.5134" lifetimeWriteEfficiencyPrct="98.7877" mountDriveEfficiencyPrct="76.378" mountInterfaceEfficiency0Prct="95.2756" mountMediumEfficiencyPrct="85.4331" mountReadEfficiencyPrct="16.6667" mountWriteEfficiencyPrct="99.8947" mountReadTransients="0" mountServoTemps="0" mountServoTransients="0" mountTemps="0" mountTotalReadRetries="0" mountTotalWriteRetries="0" mountWriteTransients="0"
[1682036670.649662000] Apr 21 02:24:30.649662 tpsrv472.cern.ch cta-taped: LVL="INFO" PID="22020" TID="27333" MSG="Logging volume statistics" thread="TapeWrite" tapeDrive="I4600232" tapeVid="I75254" mountId="777819" driveManufacturer="IBM" driveType="0359260F" firmwareVersion="5894" serialNumber="00000754418A" lifetimeBOTPasses="697" lifetimeMOTPasses="471" lifetimeVolumeMounts="50" lifetimeVolumeRecoveredReadErrors="0" lifetimeVolumeRecoveredWriteErrors="358" lifetimeVolumeUnrecoveredReadErrors="0" lifetimeVolumeUnrecoveredWriteErrors="0" validity="1" volumeManufacturingDate="20211006"
However, the same is not collected for LTO9...
For those we just get:
[1682344779.864087000] Apr 24 15:59:39.864087 tpsrv450.cern.ch cta-taped: LVL="INFO" PID="4403" TID="49676" MSG="Logging mount general statistics" thread="TapeRead" tapeDrive="I1L90623" tapeVid="L89861" mountId="779642" driveManufacturer="IBM" driveType="ULT3580-TD9" firmwareVersion="PA60" serialNumber="0007884A8B" mountTotalNonMediumErrorCounts="0"
Drive and volume statistics are missing, despite the fact that the same calls should work, according to the SCSI reference for LTO9 (page 301 - 6.4.14 LP 17h: Volume Statistics):
We need to find what is causing this problem and fix it.
For more details check the corresponding Ops issue:
Edited by Joao Afonso