From owner-freebsd-current@FreeBSD.ORG Fri Apr 15 17:54:14 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6649316A4CE; Fri, 15 Apr 2005 17:54:14 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34E4043D2F; Fri, 15 Apr 2005 17:54:14 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 227557A425; Fri, 15 Apr 2005 10:54:14 -0700 (PDT) Message-ID: <425FFFC5.3080504@elischer.org> Date: Fri, 15 Apr 2005 10:54:13 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en, hu MIME-Version: 1.0 To: Peter Wemm References: <200504121201.j3CC1nZ1035643@gw.catspoiler.org> <200504151005.25999.peter@wemm.org> In-Reply-To: <200504151005.25999.peter@wemm.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Don Lewis cc: freebsd-current@freebsd.org cc: current@freebsd.org cc: kris@obsecurity.org Subject: Re: Softupdates not preventing lengthy fsck X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 17:54:14 -0000 Peter Wemm wrote: >On Tuesday 12 April 2005 05:01 am, Don Lewis wrote: > > >>On 11 Apr, Kris Kennaway wrote: >> >> >>>On Mon, Apr 11, 2005 at 06:43:17PM -0700, Don Lewis wrote: >>> >>> >>>>On 11 Apr, Kris Kennaway wrote: >>>> >>>> >>>>>I'm seeing the following problem: on 6.0 machines which have had a lot >>>>>of FS activity in the past but are currently quiet, an unclean reboot >>>>>will require an hour or more of fscking and will end up clearing >>>>>thousands of inodes: >>>>> >>>>>[...] >>>>>/dev/da0s1e: UNREF FILE I=269731 OWNER=root MODE=100644 >>>>>/dev/da0s1e: SIZE=8555 MTIME=Apr 18 02:29 2002 (CLEARED) >>>>> >>>>>/dev/da0s1e: UNREF FILE I=269741 OWNER=root MODE=100644 >>>>>[...] >>>>> >>>>>It's as if dirty buffers aren't being written out properly, or >>>>>something. Has anyone else seen this? >>>>> >>>>> >>>>This looks a lot like it could be a vnode refcnt leak. Files won't get >>>>removed from the disk while they are still in use (the old unlink while >>>>open trick). Could nullfs be a factor? >>>> >>>> >>>Yes, I make extensive use of read-only nullfs. >>> >>>Kris (fsck still running) >>> >>> >>It would also be interesting to find out why fsck is taking so long to >>run. I don't see anything obvious in the code. >> >> > >One HUGE time factor in a fsck run is serial consoles. Printing tens or >hundreds of thousands of inode corrections at 9600 baud takes forever. At >work, we found that some fsck runs that would take 20+ hours could be reduced >to 15-20 minutes by simply redirecting fsck output to /dev/null instead of >the serial console. > >At work, we experimented with a memory based logging process that buffered up >its stdin and waited until the fs was writeable. > > We fsck the var partition first, then mount it and do our logging there. >eg: >fsck -p 2>&1 | memlogger /var/log/fsck.log > >Memlogger would malloc memory to hold fsck's output and periodically poll >for /var/log to become writable. (There was more to it than that, and I'm >not sure that we figured out all the quirks to make it usable in the /etc/rc >environment) > >-Peter > >_______________________________________________ >freebsd-current@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-current >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >