By Sven Köster and Ibrahim Tannir
Disk and tape drives both use a thin magnetic film layer to store Bits of your data, which are impressed on this film via a magnetic read/write head. A hard drive is produced in a super-clean dust-free environment and the disks that are coated with the magnetic film are enclosed in a hermetically sealed encapsulation. While reading or writing data, the disks are quickly spinning and the magnetic heads are not in direct contact with the disks, but are separated by a thin layer of air in between. In contrast, the tape drive’s head and the tape are in direct contact, while the tape is sweeping with high speed over the head. The tape’s movement over the head creates friction while in addition dust and debris particles off the tape’s surface are honing the head and collecting and building a layer on its surface. After a while, the transmission of the data information between the head and the tape degrades.
The tape drive is a sophisticated piece of equipment that is optimized to reliably store and retrieve the data in spite of the adverse operating conditions. For this purpose it in fact has four heads ordered one behind the other: the cleaning head, the erase head, the write head and the read head. All of those heads are in continuous operation. The cleaning head picks up most of the dust and debris that would otherwise stick to the other heads. The erase head resets and realigns the magnetic medium before the write head impresses new data on it, and the read head immediately checks whether the write operation had succeeded. In addition, the tape drive employs sophisticated mathematical algorithms to perform double error detections and correction. This means, that even if two bits of a data block are faulty or have changed over time, the data can still be correctly recovered. A block that is immediately detected to be incorrect after writing is marked as faulty and the data is rewritten in the following block.
This process is repeated a given number of times. The drive keeps record of those faults as a soft write or read error. If the consecutive faults exceed an allowed number, the error will be declared as a hard error. By this same mechanism, the drive detects that its performance is degrading and signals that the heads need cleaning, which it also does preemptively after a certain number of operating hours or length of tape.
Cleaning consists of mounting a cleaning tape, which the drive winds over the heads and thereby the tape’s surface binds and removes the debris off the heads. A cleaning tape can be used only for a certain number of cleaning cycles that is declared on its cover, before it looses its capacity to clean. That is why you are required to note and keep track of how many times the tape has been used.
Setting Up Cleaning
In case you have a tape library, it can do the cleaning for you. Automated cleaning can be set up in most tape libraries and it can also be configured in Archiware P5 for each library:
Note that a cleaning cartridge should be replaced after approximately 50 cleaning cycles. When cleaning manually, you should note how many times you used the tape on its case. In P5, there is a counter that you must set when configuring the cleaning slot.
In case of a stand-alone tape drive, you will need to insert the cleaning cartridge into the drive manually.
What If I Simply Ignore Cleaning?
Once the drive raises its “Cleaning required” flag, P5 will stop using the drive until it has been cleaned. The cleaning flag can be simply unset in P5 without physically cleaning the drive, but the subsequent operation will cause the drive to raise the flag again. Furthermore, the dirty drive will no longer operate flawlessly: The drive’s read-after-write control will detect more errors than usual and the drive will attempt to correct those errors. As a result:
- the tape’s capacity will decrease due to rewriting,
- writing speed will decrease due to less data being transferred,
- and the error counters will reflect all those repetitions.
But even worse: the chance that the data spontaneously changes on tape increases, since it was impressed by a weakened magnetic field.
I See Speed And Capacity Decreasing, But The Cleaning Flag Is Never Raised!
It may happen that the drive does not (yet) detect that it is dirty, but that you notice performance degrading. In that case, you can still initiate drive cleaning by manually mounting the tape, or with a library, by raising the drive’s “Cleaning Required” flag and letting P5 do the work.
The Drive Was Cleaned, But Speed And Tape Capacity Remain Low
This may happen when tapes reach the end or their life-time. You can detect this by watching the tape’s error counters in the Volume details in P5 and comparing to the other tapes. High numbers relative to the other tapes are a hint that they are worn out.
If in doubt, please read the tape durability discussion here: wikipedia.org: Linear-Tape Open
I Partitioned My Library, Do I Then Need A Cleaning Tape In Each Partition?
In case you partitioned your library so as to emulate two or more smaller libraries and you would like to avoid using multiple cleaning tapes, you should try configuring the automated cleaning in the library itself. When cleaning is configured in P5, each partition requires a separate cleaning cartridge.