Tape Input-Output error

From wiki.zmanda.com
Revision as of 09:55, 15 November 2005 by Sgw (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

--- This text was originally contributed to the AMANDA-FAQ-O-Matic by [email protected]. ---

Why does AMANDA keep on giving "Tape I/O" error for the amdump and amflush program? It always works for amcheck on new tapes (failing on reused tapes), and amlabel always works too. This leads me to believe that my 24 tapes in my cycle are still good, as well as the tape drive itself. What could it be?

  taper: tape weekly-002 kb 0 fm 0 writing filemark: Input/output error


I think I found out the problem for me, and maybe this will help others. First of all, amdump "GUESSES" how large a dump will be. This can change on a system in constant use (good time to perform remote dumps is durring scheduled downtime). So the major problem is that amdump will figure out what it has room for durring the dump, and if it 'accidently' exceeds that amount, you'll get a

  /dev/tape error input/output

There are other factors involved here, so don't rule out the obvious. 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 wont write, or writes but wont read then you probably have what I had... a bad head (tape head :). Call your company, and hope it's under warranty.