From owner-freebsd-questions@FreeBSD.ORG Fri Oct 1 09:54:22 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CAC216A4CF for ; Fri, 1 Oct 2004 09:54:22 +0000 (GMT) Received: from ngfl.dialnet.com (ngmail.ngfl.dialnet.com [212.44.44.76]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4DCB43D2F for ; Fri, 1 Oct 2004 09:54:20 +0000 (GMT) (envelope-from ict@cardinalnewman.coventry.sch.uk) Received: from ngmfilt2.ngfl.dialnet.com [212.44.44.78] by ngfl.dialnet.com with ESMTP (SMTPD32-8.12) id A9ED1C130020; Fri, 01 Oct 2004 10:57:01 +0100 Received: from relay.ngfl.dialnet.com (unverified) by ngmfilt2.ngfl.dialnet.com ; Fri, 1 Oct 2004 10:41:37 +0100 Received: from firewall.lan.cardinalnewman.coventry.sch.uk (YahooBB219209044064.bbtec.net [172.30.0.70]) by ngrelay.dialnet.com with SMTP (MailShield v2.04 - WIN32 Jul 17 2001 17:12:42); Fri, 01 Oct 2004 10:40:07 +0100 Received: from mail.lan.cardinalnewman.coventry.sch.uk (mail.lan.cardinalnewman.coventry.sch.uk [10.248.192.10]) ESMTP id i919f5It073364; Fri, 1 Oct 2004 10:41:05 +0100 (BST) (envelope-from ict@cardinalnewman.coventry.sch.uk) Received: from [10.248.195.196] (dumpster.lan.cardinalnewman.coventry.sch.uk [10.248.195.196])ESMTP id i919cZNV002677; Fri, 1 Oct 2004 10:38:35 +0100 (BST) (envelope-from ict@cardinalnewman.coventry.sch.uk) From: ict technician Organization: Cardinal Newman School To: Malcolm Kay Date: Fri, 1 Oct 2004 10:38:35 +0100 User-Agent: KMail/1.6.2 References: <200409300945.15068.ict@cardinalnewman.coventry.sch.uk> <200410010149.04790.malcolm.kay@internode.on.net> In-Reply-To: <200410010149.04790.malcolm.kay@internode.on.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410011038.35037.ict@cardinalnewman.coventry.sch.uk> X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Spam-Status: No, hits=-32.8 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_KMAIL version=2.50 X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Filter-Version: 1.11a (mail.lan.cardinalnewman.coventry.sch.uk) X-SMTP-HELO: firewall.lan.cardinalnewman.coventry.sch.uk X-SMTP-MAIL-FROM: ict@cardinalnewman.coventry.sch.uk X-SMTP-RCPT-TO: malcolm.kay@internode.on.net X-SMTP-RCPT-TO: freebsd-questions@freebsd.org X-SMTP-RCPT-TO: ianjhart@ntlworld.com X-SMTP-PEER-INFO: YahooBB219209044064.bbtec.net [172.30.0.70] cc: freebsd-questions@freebsd.org cc: ian j hart Subject: Re: broken fs dump file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2004 09:54:22 -0000 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. > > > > > > > > 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 Anyway: Not sure it's official, but I did this: cd /usr/src/sbin/restore make clean make DEBUG_FLAGS=-g 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. 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/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x08050319 in getfile (fill=0x805070c , skip=0x805070c ) at /usr/src/sbin/restore/tape.c:728 728 if (readmapflag || spcl.c_addr[i]) { (gdb) bt #0 0x08050319 in getfile (fill=0x805070c , skip=0x805070c ) 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 , skip=0x805070c ) 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 (gdb) line no. seems consistent, value of i is not. Cheers -- i j hart ICT Technician Cardinal Newman Catholic School & Community College