broken fs dump file

ict technician ict at
Fri Oct 1 02:54:22 PDT 2004

On Thursday 30 September 2004 17:19, Malcolm Kay wrote:
> On Thu, 30 Sep 2004 06:15 pm, ict technician wrote:
> > I have a broken fs dump I need to fix. Is there a diagnostic/repair tool I
> > can use? I know about restore -N.
> >
> > <No I didn't verify, and yes that was a mistake>
> >
> > Dump was taken on 4.10. Restoring on 5.3BETA, although I can change that.
> >
> A question rather than an answer:----
>   Is it valid to dump a ufs file system and try to restore it to a ufs2
>   system?
> Malcolm

wrt dump:
	on 5.x dump has to understand ufs2. However, you might choose to use ufs; so
it has to deal with that. Since dump does both, restore must do both. QED :)

wrt files:
	I don't think ufs2 was MFCd so you can't put a 4.x system on ufs2 and expect it
to work, if that's what you mean.

> > Content is our Samba server home directories. I need to extract the data so
> > that I can copy it to our new 2k3 server. File is big (50Gb). A full
> > listing looks okay but the extract fails, apparently while skipping.
> >
> > supplementary question: How do I compile restore for debugging. I cannot
> > find 'the magic'.
> >
> > Thanks


Not sure it's official, but I did this:

cd /usr/src/sbin/restore
make clean

I tried again on a 4.10 box and it skips and resyncs 3 times and is missing three files; which
is at least consistent. <wipes sweat from brow>

So this looks distinctly like bad RAM. However...

md5 of the 50Gb file is consistent between the two boxes
memtest pass of 18hrs

Since the error is apparently in the "skip recovery" code, could this be a regression that
no-one (else) has noticed.

backup# gdb /usr/obj/usr/src/sbin/restore/restore
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) core-file restore.core
Core was generated by `restore'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/
Loaded symbols for /lib/
Reading symbols from /libexec/
Loaded symbols for /libexec/
#0  0x08050319 in getfile (fill=0x805070c <xtrnull>, skip=0x805070c <xtrnull>) at /usr/src/sbin/restore/tape.c:728
728                     if (readmapflag || spcl.c_addr[i]) {
(gdb) bt
#0  0x08050319 in getfile (fill=0x805070c <xtrnull>, skip=0x805070c <xtrnull>) at /usr/src/sbin/restore/tape.c:728
#1  0x0805026a in skipfile () at /usr/src/sbin/restore/tape.c:700
#2  0x0804c809 in createfiles () at /usr/src/sbin/restore/restore.c:711
#3  0x0804a159 in main (argc=-1, argv=0xbfbfec68) at /usr/src/sbin/restore/main.c:278
(gdb) frame
#0  0x08050319 in getfile (fill=0x805070c <xtrnull>, skip=0x805070c <xtrnull>) at /usr/src/sbin/restore/tape.c:728
728                     if (readmapflag || spcl.c_addr[i]) {
(gdb) list
723             if (!gettingfile && setjmp(restart) != 0)
724                     return;
725             gettingfile++;
726     loop:
727             for (i = 0; i < spcl.c_count; i++) {
728                     if (readmapflag || spcl.c_addr[i]) {
729                             readtape(&buf[curblk++][0]);
730                             if (curblk == fssize / TP_BSIZE) {
731                                     (*fill)((char *)buf, (long)(size > TP_BSIZE ?
732                                          fssize : (curblk - 1) * TP_BSIZE + size));
(gdb) print i
$1 = 53650716

line no. seems consistent, value of i is not.


i j hart

ICT Technician
Cardinal Newman Catholic School & Community College

More information about the freebsd-questions mailing list