How To:Diagnose a Failing Tape Drive

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

This article is a part of the How Tos collection.

My drive was involved in a lightning storm and hadn't worked well since. I tested it by rebooting my system (to make sure everything was clean), then I used the following commands to diagnose my drive after I put a unimportant and supposedly good tape in the drive

  mt rewind
  mt setblk 0
  tar -cpvf /dev/nst0 /home/loodwig
  mkdir /home/loodwig/dummy
  cd /home/loodwig/dummy
  mt rewind
  tar -xpvf /dev/nst0

tried this 5 times. 3 times it gave i/o errors, meaning the drive was junk. Replacement drive gives occasional errors, but the gab is that the same tape will work in the future, amflush works on putting the 'degraded' dumps elsewhere, and adjusting the tapesize to something smaller (turned a 7gb to a 6.5) in the tape type field in amanda.conf will reduce the occurance of the error. Just make sure your temporary holding space can hold a FULL DUMP and then some (I do 6.5 gb dumps, and a 10gb scsi partition for backups alone). Worse case scenario, you have at least 1 night's backup on your hard drive for those users who magically erase directories on a whim (provided you don't need old data, this is a nice temporary fix).

Another thing to note also is how long does it take to fail, if it fails if part of the tape gets written, and then it 'broken-pipe's or 'i/o error's on you, then the drive is probably just dirty if it fails right away, check controller cards, cables, connections, kernel support, etc

If it reads but won't write, or writes but won't read then you probably have what I had... a bad head (tape head :). Call your company, and hope it's under warranty.

Credits

This text was originally contributed to the AMANDA-FAQ-O-Matic by loodwig@psi.edu.

Personal tools