EOF, check amidxtaped.debug: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
No edit summary
 
(man links)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
--- This text was originally contributed to the AMANDA-FAQ-O-Matic by [email protected]. ---
__NOTOC__
 
{{Troubleshooting Header}}
If amrecover fails with a message that includes:  
=Problem=
{{man|8|amrecover}} fails with a message that includes:  


   EOF, check amidxtaped.debug file.
   EOF, check amidxtaped.debug file.
   amrecover: short block 0 bytes
   amrecover: short block 0 bytes


You might need to rewind the tape. AMANDA uses the non-rewinding version of the tape device, so that you can append data after amdump/amflush.
=Solution=
Look for the file named amidxtaped.''datetime''.debug in the [[AMANDA_DBGDIR]] directory on the tape '''server''' (not the client) for clues. 
 
==Need to rewind the tape?==
 
A frequent mistake is to forget to rewind the tape.
 
Why isn't the tape rewound automatically?
 
When inserting a tape, you can position the tape with "mt fsf" just before the required image to speed up the restore procedure.  It would be counterproductive in that case to rewind again, so Amanda leaves a tape where it is positioned and amidxtaped (the daemon process on the server communicating with amrecover on the client) starts {{man|8|amrestore}} from that position.
 
Since version 2.4.3, amanda can position the tape automatically by enabling the option in {{man|5|amanda.conf}}:
 
amrecover_do_fsf  yes
 
This option first rewinds, and than skips forward quickly to the image.
A related and useful option is:
 
amrecover_check_label  yes
 
which checks if you inserted the correct tape.
 
Without the above option, rewind manually (and possibly position) the tape before each restore in a second shell while amrecover waits for you to start the extraction process, with the command (fill in the device name of your tape drive):
 
$ mt -t /dev/nst0 rewind
 
'''Note:''' a "virtual tape" needs rewinding too, using the {{man|8|ammt}} command:
 
$ ammt -t file:/space/vtapes/slots rewind


amrecover '''DOES NOT REWIND THE TAPE FOR YOU''', because it has no way of knowing what part of the tape you want to restore from. A simple
The directory you need to specify is the parent of the "data" directory of the virtual tape.


  mt -f /dev/yourtapedevice rewind
==Tape device is /dev/null?==


before amrecover is a good idea.
Sometimes the default tape device specified at compile time is not what you expect.
Find out what the default tape device is:


  $ amadmin x version | grep TAPE_DEVICE
  DEFAULT_TAPE_DEVICE="/dev/null"


----
Reading from /dev/null results indeed in "short block 0 bytes".


sgw: A common trick is to run that command in a second shell while amrecover waits for you to start the extraction-process.
In this case, override the default tape device on the commandline of amrecover:


----
  $ amrecover -C daily -d /dev/nst0


--- This text was originally contributed to the AMANDA-FAQ-O-Matic by [email protected]. ---
or specify it from inside [[amrecover]]:


To solve my EOF troubles with amrecover, I found that specifying the tape device
  amrecover>  settape /dev/nst0
on the amrecover command line did the trick:


  amrecover -C SANhomedirs -d /dev/nst0
or just before extracting:


If I do not specify the tape drive, everything seems to work OK until I attempt
  Load tape DMP014 now
an extract, at which point I get the dreaded EOF.
  Continue? [Y/n/t]: t
  Tape device: server2:/dev/nst2
  Continue? [Y/n/t]: Y
  Using tape /dev/nst2 from server server2.

Latest revision as of 22:50, 30 June 2008

This article is a part of the Troubleshooting collection.

Problem

amrecover(8) fails with a message that includes:

 EOF, check amidxtaped.debug file.
 amrecover: short block 0 bytes

Solution

Look for the file named amidxtaped.datetime.debug in the AMANDA_DBGDIR directory on the tape server (not the client) for clues.

Need to rewind the tape?

A frequent mistake is to forget to rewind the tape.

Why isn't the tape rewound automatically?

When inserting a tape, you can position the tape with "mt fsf" just before the required image to speed up the restore procedure. It would be counterproductive in that case to rewind again, so Amanda leaves a tape where it is positioned and amidxtaped (the daemon process on the server communicating with amrecover on the client) starts amrestore(8) from that position.

Since version 2.4.3, amanda can position the tape automatically by enabling the option in amanda.conf(5):

amrecover_do_fsf  yes

This option first rewinds, and than skips forward quickly to the image. A related and useful option is:

amrecover_check_label  yes

which checks if you inserted the correct tape.

Without the above option, rewind manually (and possibly position) the tape before each restore in a second shell while amrecover waits for you to start the extraction process, with the command (fill in the device name of your tape drive):

$ mt -t /dev/nst0 rewind

Note: a "virtual tape" needs rewinding too, using the ammt(8) command:

$ ammt -t file:/space/vtapes/slots rewind

The directory you need to specify is the parent of the "data" directory of the virtual tape.

Tape device is /dev/null?

Sometimes the default tape device specified at compile time is not what you expect. Find out what the default tape device is:

 $ amadmin x version | grep TAPE_DEVICE
 DEFAULT_TAPE_DEVICE="/dev/null"

Reading from /dev/null results indeed in "short block 0 bytes".

In this case, override the default tape device on the commandline of amrecover:

 $ amrecover -C daily -d /dev/nst0

or specify it from inside amrecover:

 amrecover>  settape /dev/nst0

or just before extracting:

 Load tape DMP014 now
 Continue? [Y/n/t]: t
 Tape device: server2:/dev/nst2
 Continue? [Y/n/t]: Y
 Using tape /dev/nst2 from server server2.