From owner-freebsd-fs@FreeBSD.ORG Wed Jan 11 20:47:55 2012 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3786106564A for ; Wed, 11 Jan 2012 20:47:55 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id 60F378FC15 for ; Wed, 11 Jan 2012 20:47:54 +0000 (UTC) Received: from mart.js.berklix.net (p5DCBF135.dip.t-dialin.net [93.203.241.53]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id q0BKlqfH043785; Wed, 11 Jan 2012 20:47:53 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id q0BKlfsE048693; Wed, 11 Jan 2012 21:47:41 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id q0BKlTW8042343; Wed, 11 Jan 2012 21:47:35 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201201112047.q0BKlTW8042343@fire.js.berklix.net> To: Kirk McKusick From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Tue, 10 Jan 2012 14:21:08 PST." <201201102221.q0AML8MX012837@chez.mckusick.com> Date: Wed, 11 Jan 2012 21:47:29 +0100 Sender: jhs@berklix.com Cc: fs@freebsd.org Subject: Re: unexpected soft update inconsistency - cannot fix X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 20:47:56 -0000 Hi Kirk cc fs@, OK, it all worked as you said, Thanks for the explanations ! Maybe if I or others get some time it'd be worth tweaking the code: - It's suprising ".." has to be 2nd entry & fsck/fsdb can't find it later. - fsck &/or fsdb dont have to just give up on no parent inode, they could search down from root looking for a prent inode listing the damaged child inode, like I did with find, (Possibly first stab might be some nasty system("...") cludges to a printf as a hint to user). I'll save this mail thread in my personal tree in case I get time to hack code :-) Detail of the repair: cd /mnt/ftp/.backup/pri/FreeBSD/development/FreeBSD-CVS/ports/net/\ keepalived/Attic ls -fa ./ Makefile,v distinfo,v pkg-descr,v pkg-plist,v mv Makefile,v Makefile,v.sav ls -fa ./ distinfo,v pkg-descr,v pkg-plist,v Makefile,v.sav umount mnt fsdb -r /dev/ad4s4g # just looking inode 825575 current inode: directory I=825575 MODE=40755 SIZE=512 BTIME=Dec 29 20:09:19 2011 [0 nsec] MTIME=Jan 11 08:57:58 2012 [0 nsec] CTIME=Jan 11 08:57:58 2012 [0 nsec] ATIME=Jan 11 08:58:14 2012 [0 nsec] OWNER=mailnull GRP=mailnull LINKCNT=2 FLAGS=0 BLKCNT=4 \ GEN=29c28025 fsdb (inum: 825575)> ls slot 0 ino 825575 reclen 40: directory, `.' slot 1 ino 825581 reclen 20: regular, `distinfo,v' slot 2 ino 825582 reclen 20: regular, `pkg-descr,v' slot 3 ino 825583 reclen 20: regular, `pkg-plist,v' slot 4 ino 825580 reclen 412: regular, `Makefile,v.sav' ^D # end of looking fsck /dev/ad4s4g ** /dev/ad4s4g ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames MISSING '..' I=825575 OWNER=mailnull MODE=40755 SIZE=512 MTIME=Jan 11 08:57 2012 DIR=/ftp/.backup/pri/FreeBSD/development/FreeBSD-CVS/ports/\ net/keepalived/Attic FIX? [yn] y ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts LINK COUNT DIR I=79302719 OWNER=mailnull MODE=40755 SIZE=512 MTIME=Dec 29 20:09 2011 COUNT 3 SHOULD BE 4 ADJUST? [yn] y ** Phase 5 - Check Cyl groups 1360879 files, 126366566 used, 180989615 free (1437463 frags, \ 22444019 blocks, 0.5% fragmentation) ***** FILE SYSTEM IS CLEAN ***** ***** FILE SYSTEM WAS MODIFIED ***** fsck /dev/ad4s4g # No errs .. FILE SYSTEM IS CLEAN mount -t ufs /dev/ad4s4g /mnt cd /mnt/ftp/.backup/pri/FreeBSD/development/FreeBSD-CVS/ports/net/\ keepalived/Attic mv Makefile,v.sav Makefile,v Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Reply below not above, cumulative like a play script, & indent with "> ". Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.