How to be aware of EOL tapes

Hello CTA team,

As part of our monitoring efforts, we are looking for a way to trigger “Nearing Media Life” and “End of Life” (EOL) alarms for any tape. While reviewing the CTA codebase, I noticed there is a CASTOR implementation for Tape Alerts (SCSI Command 4D, Page 2E) that could be useful to integrate into the cta-taped daemon.

CTA/tapeserver/castor/tape/tapeserver/SCSI/Constants.cpp std::string castor::tape::SCSI::tapeAlertToString(uint16_t parameterCode)

I tested this command and observed that Flag 07h is set to true when a mount occurs (cta-smc -m), but the log sense is cleared after running the command.

hexcode flag name
0x0007(7) true Media life

I believe it would be beneficial to log these flags when a tape mount occurs so we can enable notifications when tapes are approaching EOL (Flags 13h and 07h).

Greetings

My apology, I jumped into a wrong conclusion, digging more into CTA code I see it’s already implemented on Read and Write mounts but we haven’t see any 0x07 or 0x13 tapeAlert in the logs.

This are the tapeAlerts we have in our logs for the last 6 months.

Hi Leopoldo Muñoz,

At the end of each tape session CTA tape daemon logs 3 lines with statistics about: mount, drive and tape/volume.

Please have a look a the volume statistics, there you should find values such as: lifetimeMOTPasses and lifetimeVolumeMounts

Example:

{"epoch_time":1755411389.996426313,"local_time":"2025-08-17T08:16:29+0200","hostname":"tpsrv450","program":"cta-taped","log_level":"INFO","pid":3999448,"tid":4000011,"message":"Logging volume statistics","drive_name":"IBMLIB1-LTO9-F06C2R3","instance":"ctaproduction","sched_backend":"cephUser","thread":"TapeRead","tapeDrive":"IBMLIB1-LTO9-F06C2R3","tapeVid":"L66864","mountId":"1955799","vo":"ALICE","tapePool":"vo_ALICE_raw","driveManufacturer":"IBM     ","driveType":"ULT3580-TD9","firmwareVersion":"S2S0","serialNumber":"0007884A8B","lifetimeBOTPasses":949,"lifetimeMOTPasses":818,"lifetimeVolumeMounts":133,"lifetimeVolumeRecoveredReadErrors":1,"lifetimeVolumeRecoveredWriteErrors":14,"lifetimeVolumeUnrecoveredReadErrors":0,"lifetimeVolumeUnrecoveredWriteErrors":0,"validity":1}

This can be used to determine the how close to the End-of-Life a particular tape is.

Best regards,

Vladimir Bahyl
CERN

1 Like