What is CleanerSession

We got the errors shown below in one of our CTA setups. At first we assume that CTA was deciding a cleaning cartridge had to be used and was taking care of it. Looking into the code a little bit, it looks to me like it’s just trying to “clear” the drive to be empty and ready for another mount.

Is that what it is? If CTA really is managing the cleaning of drives, how do we turn it off? I’m told our libraries all do this themselves.

[root@gmv18018 log]# grep MTREW messages
Jan 10 13:39:48 gmv18018 cta-taped: LVL="ERROR" PID="2768601" TID="2768601" MSG="In CleanerSession::exceptionThrowingExecute(), failed to clean the Drive with a tape mounted. Disabling the tape." tapeVid="VR5871" tapeDrive="LTO8D1" logicalLibrary="TS4500G1" host="gmv18018" exceptionMsg="Failed ST ioctl (MTREW) in DriveGeneric::rewind Errno=5: Input/output error"
Jan 10 13:39:48 gmv18018 cta-taped: LVL="ERROR" PID="2768601" TID="2768601" MSG="Cleaner failed. Putting the drive down." tapeVid="VR5871" tapeDrive="LTO8D1" message="Failed ST ioctl (MTREW) in DriveGeneric::rewind Errno=5: Input/output error"
Jan 10 13:39:48 gmv18018 cta-taped: LVL="INFO" PID="2768601" TID="2768601" MSG="In Scheduler::setDesiredDriveState(): success." drive="LTO8D1" up="down" force="no" reason="[cta-taped] ERROR Cleaner failed. Failed ST ioctl (MTREW) in DriveGeneric::rewind Errno=5: Input/output error" comment="" schedulerDbTime="0.004730"

Hello Eric,

CTA is not managing cleaning of the drives (with cleaning cartridges) at all, it leaves that to the library.

The message above is perhaps not ideally named, but it refers to cleaning (= dismounting) a catridge from a tape drive at the end of a session. Normally, everything is working fine, but in case of a failure, so called CleanerSession kicks in and tries to dismount the cartridge.

If the error is serious and it fails (like in your case = tape is really stuck) it will put the drive Down (i.e. not ready for the next mount) in order to prevent accepting other requests and trying to mount other tapes to a drive which is not free (= becaming a sort of black hole for requests).

Let me know if you need further explanations,

Vladimir

That’s great. Thanks!