From owner-freebsd-fs@freebsd.org Fri Feb 5 06:56:26 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F413A9CBDC for ; Fri, 5 Feb 2016 06:56:26 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 4CD271D17 for ; Fri, 5 Feb 2016 06:56:26 +0000 (UTC) (envelope-from julian@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 4986FA9CBDA; Fri, 5 Feb 2016 06:56:26 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FCC6A9CBD7 for ; Fri, 5 Feb 2016 06:56:26 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 00AC21D16 for ; Fri, 5 Feb 2016 06:56:25 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-229-231.lns20.per1.internode.on.net [121.45.229.231]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u156uDUV023581 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 4 Feb 2016 22:56:16 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: fsck on current not always prompting a 2nd run when it should To: Kirk McKusick , "Julian H. Stacey" References: <201602041840.u14Iednl010551@chez.mckusick.com> Cc: fs@freebsd.org From: Julian Elischer Message-ID: <56B44788.8060409@freebsd.org> Date: Fri, 5 Feb 2016 14:56:08 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <201602041840.u14Iednl010551@chez.mckusick.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 06:56:26 -0000 On 5/02/2016 2:40 AM, Kirk McKusick wrote: >> To: fs@freebsd.org >> Subject: fsck on current not always prompting a 2nd run when it should >> From: "Julian H. Stacey" >> Organization: http://berklix.eu BSD Linux Unix Consultants, Munich Germany >> Date: Wed, 03 Feb 2016 02:34:43 +0100 >> Cc: "Julian H. Stacey" >> >> Hi fs@ people >> fsck is sometimes (not always) not prompting for a 2nd run of fsck >> when FS is still bad. (After a few crashes I've become cautious >> enough to give it a 2nd run even after it first detects no errors >> left to fix. There's a bug in fsck somewhere, it should ask for a >> re-run more than it does. >> >> fsck running on uname -a >> FreeBSD lapr.js.berklix.net 11.0-CURRENT FreeBSD 11.0-CURRENT #12182: >> Mon Oct 19 23:57:08 CEST 2015 >> jhs@lapr.js.berklix.net:/usr/src/sys/amd64/compile/LAPR.small amd64 >> >> Background: >> partition was corrupted running 10.2-RELEASE, but fsck is running on current. >> >> On 10.2-RELEASE I've been doing intensive IO for days, >> cd /usr/ports ; make reinstall-recursive >> # http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/ports/gen/Mk/ >> with a selection of */Makefile.inc that result in my 1000+ favourites >> being shown by >> pkg info | wc -l >> This has repeatedly reinstalled some common dependency ports/, hence heavy IO. >> + rdist mirroring, >> + devd usb ufs stick mounts, mdconfig, gbde, shells to umount & >> maybe mdconfig -u after. >> Plenty of activity might have caused the corruption, but ... >> >> I'm not querying corruption on 10.2-RELEASE I'm just concerned fsck on >> current fails to tell me to re-run fsck. >> >> I didnt save previous fsck reports, but have this one. >> Current fstab: >> /dev/ada0s4f /data ufs rw,noauto 1 5 >> >> rc.conf: background_fsck="NO" >> >> dumpfs -m /dev/ada0s4f >> newfs -O 2 -U -a 4 -b 32768 -d 32768 -e 4096 -f 4096 -g 16384 -h 64 -i 8192 -j -k 6408 -m 8 -o time -s 1793576920 /dev/ada0s4f >> >> fsck -y /data >> ** /dev/ada0s4f >> >> USE JOURNAL? yes >> >> ** SU+J Recovering /dev/ada0s4f >> ** Reading 33554432 byte journal from inode 70. >> >> RECOVER? yes >> >> ** Building recovery table. >> ** Resolving unreferenced inode list. >> ** Processing journal entries. >> >> WRITE CHANGES? yes >> >> ** 1974 journal records in 105472 bytes for 59.89% utilization >> ** Freed 0 inodes (0 dirs) 0 blocks, and 0 frags. >> >> ***** FILE SYSTEM MARKED CLEAN ***** >> That ran very suspiciously quickly, so I ran it again, >> took a long time (as about 900 gig) >> >> fsck -y /data >> ** /dev/ada0s4f >> >> USE JOURNAL? yes >> >> ** SU+J Recovering /dev/ada0s4f >> Journal timestamp does not match fs mount time >> ** Skipping journal, falling through to full fsck >> >> ** Last Mounted on /s4/data >> ** Phase 1 - Check Blocks and Sizes >> ** Phase 2 - Check Pathnames >> UNALLOCATED I=19604676 OWNER=root MODE=0 >> SIZE=0 MTIME=Feb 3 00:52 2016 >> NAME=/release/10.2-RELEASE/usr/ports/x11/pixman/work/.PLIST.setuid >> >> UNEXPECTED SOFT UPDATE INCONSISTENCY >> >> REMOVE? yes >> >> UNALLOCATED I=19604677 OWNER=root MODE=0 >> SIZE=0 MTIME=Feb 3 00:52 2016 >> NAME=/release/10.2-RELEASE/usr/ports/x11/pixman/work/.PLIST.writable >> >> UNEXPECTED SOFT UPDATE INCONSISTENCY >> >> REMOVE? yes >> >> UNALLOCATED I=19604678 OWNER=root MODE=0 >> SIZE=0 MTIME=Feb 3 00:52 2016 >> NAME=/release/10.2-RELEASE/usr/ports/x11/pixman/work/.PLIST.objdump >> >> UNEXPECTED SOFT UPDATE INCONSISTENCY >> >> REMOVE? yes >> >> UNALLOCATED I=19604679 OWNER=root MODE=0 >> SIZE=0 MTIME=Feb 3 00:40 2016 >> NAME=/release/10.2-RELEASE/usr/ports/x11/pixman/work/.install_done.pixman._usr_local >> >> UNEXPECTED SOFT UPDATE INCONSISTENCY >> >> REMOVE? yes >> ** Phase 3 - Check Connectivity >> ** Phase 4 - Check Reference Counts >> ** Phase 5 - Check Cyl groups >> FREE BLK COUNT(S) WRONG IN SUPERBLK >> SALVAGE? yes >> >> SUMMARY INFORMATION BAD >> SALVAGE? yes >> >> BLK(S) MISSING IN BIT MAPS >> SALVAGE? yes >> >> 10707223 files, 158068913 used, 59088404 free (1210332 frags, 7234759 blocks, 0.6% fragmentation) >> >> ***** FILE SYSTEM MARKED DIRTY ***** >> >> ***** FILE SYSTEM WAS MODIFIED ***** >> >> ***** PLEASE RERUN FSCK ***** >> >> fsck -y /data >> ** /dev/ada0s4f >> >> USE JOURNAL? yes >> >> ** SU+J Recovering /dev/ada0s4f >> Journal timestamp does not match fs mount time >> ** Skipping journal, falling through to full fsck >> >> ** Last Mounted on /s4/data >> ** Phase 1 - Check Blocks and Sizes >> ** Phase 2 - Check Pathnames >> ** Phase 2 - Check Pathnames >> ** Phase 3 - Check Connectivity >> ** Phase 4 - Check Reference Counts >> ** Phase 5 - Check Cyl groups >> 10707223 files, 158068913 used, 59088404 free (1210332 frags, 7234759 blocks, 0.6% fragmentation) >> >> ***** FILE SYSTEM MARKED CLEAN ***** >> >> ***** FILE SYSTEM WAS MODIFIED ***** >> >> Cheers, >> Julian >> -- >> Julian Stacey, BSD Linux Unix Sys. Eng. Consultant Munich http://berklix.eu >> Mail plain text, No quoted-printable, HTML, base64, MS.doc. >> Prefix old lines '> ' Reply below old, like play script. Break lines by 80. > If you tell fsck to use the journal, it assumes that the filesystem is > basically in good shape and it just needs to take care of the > transactions in the journal. That way the the reboot is much quicker > because it doesn't have to wait for a full fsck. > > If media errors or other unexpected problems arise, then they are > not known by the journal and will only be found by running a full > fsck (which is what is what you got when you did a second run above). that's a good explanation.. maybe it should be put in the man page in that way (easy to understand) .. > > Kirk McKusick > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >