Scott Lambert
2008-May-01 21:19 UTC
restore issues "Header with wrong dumpdate." and "getfile: lost data"
We have upgraded our AMANDA server from FreeBSD 4.x to FreeBSD 7.0-RELEASE. We still have several 4.x boxes and are having issues when we try to restore files on the AMANDA server for any of the 4.x servers. We see the following errors running amrecover: Header with wrong dumpdate. Header with wrong dumpdate. getfile: lost data abort? [yn] n Header with wrong dumpdate. Header with wrong dumpdate. Header with wrong dumpdate. Header with wrong dumpdate. getfile: lost data abort? [yn] n Header with wrong dumpdate. Header with wrong dumpdate. Header with wrong dumpdate. Header with wrong dumpdate. Header with wrong dumpdate. Header with wrong dumpdate. Header with wrong dumpdate. Header with wrong dumpdate. getfile: lost data abort? [yn] y So long as I keep saying no to the amanda abort prompt, the files are successfully restored. I've seen http://www.freebsd.org/cgi/query-pr.cgi?pr=120881 which seems to apply to the "getfile: lost data" lines. There is also http://www.FreeBSD.org/cgi/query-pr.cgi?pr=bin/118087 which seems to apply to "Header with wrong dumpdate." 118087 seems to have been applied to CVS in rev 1.51 of tape.c by mckusick a couple of weeks ago. I don't think it has been merged to 7-STABLE yet. 120881 seems not to have been applied to CVS just yet. Does anyone have a guess as to when restore will be fixed in -STABLE? -- Scott Lambert KC5MLE Unix SysAdmin lambert@lambertfam.org
David Malone
2008-May-02 14:33 UTC
restore issues "Header with wrong dumpdate." and "getfile: lost data"
On Thu, May 01, 2008 at 03:52:14PM -0500, Scott Lambert wrote:> I've seen http://www.freebsd.org/cgi/query-pr.cgi?pr=120881 which > seems to apply to the "getfile: lost data" lines. There is also > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=bin/118087 which seems to > apply to "Header with wrong dumpdate."I believe these are basically harmless. I don't know if Kirk plans to merge the fix, but I can do it if he wants.> 120881 seems not to have been applied to CVS just yet.Ah - I'd missed 120881. This seems to relate to a more recent change of Kirk's. Kirk - do you want to look at: http://www.freebsd.org/cgi/query-pr.cgi?pr=120881 or would you prefer if I had a look at it? David.
Kirk McKusick
2008-May-03 20:36 UTC
restore issues "Header with wrong dumpdate." and "getfile: lost data"
> Date: Fri, 2 May 2008 15:33:03 +0100 > From: David Malone <dwmalone@maths.tcd.ie> > To: stable@freebsd.org > Cc: mckusick@mckusick.com > Subject: Re: restore issues "Header with wrong dumpdate." and "getfile: lost data" > > On Thu, May 01, 2008 at 03:52:14PM -0500, Scott Lambert wrote: > > I've seen http://www.freebsd.org/cgi/query-pr.cgi?pr=120881 which > > seems to apply to the "getfile: lost data" lines. There is also > > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=bin/118087 which seems to > > apply to "Header with wrong dumpdate." > > I believe these are basically harmless. I don't know if Kirk plans > to merge the fix, but I can do it if he wants.I put in the fix for "Header with wrong dumpdate" when I came across it. I never realized that there was an outstanding PR. I am happy to have you MFC the fix and close the PR with an appropriate note that it has been fixed.> > 120881 seems not to have been applied to CVS just yet. > > Ah - I'd missed 120881. This seems to relate to a more recent change > of Kirk's. Kirk - do you want to look at: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=120881 > > or would you prefer if I had a look at it? > > David.I have taken a look at it and can make the following observations on the proposed fix: It seems that the culprit is the following sequence in tape.c if (curblk > 0) panic("getfile: lost data\n"); This was introduced in version 1.48 Version 1.44.2.1 of tape.c shipped with FreeBSD 6.2 has a different handler: if (curblk > 0) (*fill)((char *)buf, (long)((curblk * TP_BSIZE) + size)); which doesn't panic. The 1.48 change added support for restoring extended attributes. This change was never MFC'ed to FreeBSD 6 as it required updates of <protocols/dumprestore.h> and <sys/extattr.h>. There was concern that too many folks would get compile errors in `make world' and not understand what needed to be done to fix them. So the if (curblk > 0) (*fill)((char *)buf, (long)((curblk * TP_BSIZE) + size)); code in 1.44.2.1 is correct for that version of restore because it does not support extended attributes. I put the panic in for 1.48 because I believed that I would always have skipped over any extra blocks at the end of a file (or extended attribute) and thus there should never have been any left. Obviously, I missed some case :-( So, while the proposed fix does get rid of the panic, my concern is that it will instead put some spurious data at the end of a file or extended attribute. Ideally, I would like to get a copy of the dump (or really just the first part of it needed to reproduce the problem) so that I can analyze it to figure out what I am doing wrong. Kirk McKusick