When should you clean your drives?

A recent discussion on the NetWorker Mailing List about configuring cleaning cartridges prompted me that it would be worthwhile to quickly cover off the oft-asked questions:

  • How frequently should I clean my drives?
  • Should I have NetWorker, or the tape library, clean my drives?

There are two schools of thought when it comes to the frequency of the cleaning. The first is to only have the drive(s) cleaned when they request cleaning. The second is to clean religiously, every X weeks, regardless of whether they request cleaning or not.

There are pros and cons to both techniques.

When it comes to only cleaning when necessary, one of the primary reasons for this technique is that cleaning is essentially an abrasive action – by running a cleaning cartridge through a drive, the drive heads are being rubbed clean by the cleaning tape. This obviously introduces some physical wear, however trivial, which may over time affect the longevity of the drive. Therefore, one can extract maximum life out of ones’ tape drives by only cleaning when requested.

The second technique, that being to clean every X weeks, regardless of whether the drives request cleaning or not, is premised on the notion that it reduces any build-up of dust and particulates on the drives, thus reducing the chances of the drive compromising the longevity of the tape.

So, which should you choose? Well, that probably depends on how clean your environment is. If your drives are in a well protected, isolated environment that has excellent dust filtering, you may very well find that using drive-initiated cleaning is the way to go. However, if your environment isn’t so clean, then forcing periodic cleaning may be more appropriate.

These days, given the increase in technology surrounding tape drives, and the replacement timeframes, I suspect the “abrasive action” argument holds perhaps less force than it used to. Ultimately as well, if your primary goal is to ensure healthy backups, then running a cleaning cartridge periodically through drives to reduce the chance of either a backup or recovery failing/requiring a restart due to cleaning being required may be a smart thing to do.

Next, we must move on to whether NetWorker should clean the drives, or whether the tape library should do so.

In versions of NetWorker 7.3.x and lower, I always advocated that NetWorker manage the cleaning. NetWorker in such versions had a tendency to not react well to any situation where it went to use a drive only to find it was already occupied, even if that was with a cleaning cartridge.

However, with 7.4.x and higher, I have noticed NetWorker is significantly more capable of detecting that a drive is being cleaned and not treating it as an error; instead it simply chooses to retry the operation.

Thus, these days I’d suggest that the decision as to whether NetWorker or the library controls drive cleaning is entirely a personal one, in the same way that choosing to wear black or blue socks is a personal one. My personal preference is that if the library/drives I’m using supports TapeAlert, and I’m using NetWorker 7.4.x or higher, I’ll now enable library controlled cleaning. With older libraries/drives or NetWorker 7.3.x/lower, I’ll have NetWorker manage the cleaning.

3 thoughts on “When should you clean your drives?”

  1. It’s been ages since I’ve had to manage a Networker environment but when I did, there was an annoying bug. When there was possible issue with writing to a tape, Networker would flag it, after x (20 IIRC) number of flags a “clean” operation was sent. A very troublesome backup job would result in a whole cleaning cart being used in one week. Do you remember this as an issue, or am I completely bat-shit insane? If so, would you care to expand on it? Expand on the issue please, not my insanity. 😛

  2. I have seen instances where NetWorker would respond to errors by loading a cleaning cartridge, and yes, in doing so it would rapidly use up cleaning cartridges that may otherwise take months to be used even a couple of times.

    I’ll admit though, I don’t recall seeing that style of error since around the time of 6.1.x.

  3. Which is probably the last time I had to look after a Networker setup. Thanks though, as always, a world of information.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.