From owner-freebsd-questions@FreeBSD.ORG Sat Jun 23 11:14:02 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4326E1065673 for ; Sat, 23 Jun 2012 11:14:02 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 005F08FC08 for ; Sat, 23 Jun 2012 11:14:01 +0000 (UTC) Received: from r56.edvax.de (port-92-195-102-5.dynamic.qsc.de [92.195.102.5]) by mx02.qsc.de (Postfix) with ESMTP id 293A32842C; Sat, 23 Jun 2012 13:13:55 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q5NBDsS4005333; Sat, 23 Jun 2012 13:13:54 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 23 Jun 2012 13:13:54 +0200 From: Polytropon To: "Julian H. Stacey" Message-Id: <20120623131354.a6407d6c.freebsd@edvax.de> In-Reply-To: <201206231057.q5NAv1tF086046@fire.js.berklix.net> References: <20120623042229.c5d8a8d8.freebsd@edvax.de> <201206231057.q5NAv1tF086046@fire.js.berklix.net> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "=?ISO-8859-1?Q? Leonardo_M._Ram=E9 ?=" , Free BSD Subject: Re: fsck_ufs running too often X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jun 2012 11:14:02 -0000 On Sat, 23 Jun 2012 12:57:01 +0200, Julian H. Stacey wrote: > > My suggestion: Set background_fsck="YES" in /etc/rc.conf and let > > the system boot up that way. _If_ you have a faulty disk or other > > data corruption, you'll notice this _before_ going multi-user and > > maybe making things worse. Yes, it might take some time, but it's > > time well invested in your data integrity. > > > > Alternative: Perform a "shutdown now" and go into single-user mode. > > Then unmount all your file systems, do "mount -o ro /" and then > > perform the fsck run on all file systems. It's typically adviced > > to perform file system checks on unmounted (or at least read-only > > mounted) file systems. > > man fsck: > ----- > Note that background fsck is limited to checking for only the > most commonly occurring file system abnormalities. Under certain > circumstances, some errors can escape background fsck. It is > recommended that you perform foreground fsck on your systems > periodically and whenever you encounter file-system-related pan- > ics. > --- > > So do a manual fsck to make sure there's no residual faults lurking. Sorry, my own stupidity. Of course I wanted to say: My suggestion: Set background_fsck="NO" in /etc/rc.conf and [...] ^^ A fsck at boot time might take longer, but will make sure that the startup of the system is performed on clean file systems. One may argue: "But it takes time!" My response: Is your data valuable? Then you have this time, in worst case. In ultra-worst case, you have backups. :-) > Realise fsck wont start if it thinks its clean, (but might not be clean) so > Boot single user & type > fsck > or fsck -y You can force a fsck run by using "fsck -f"; from the manual: "Force checking of file systems, even when they are marked clean (for file systems that support this)." This could also be done regularly on a scheduled (!) basis if there's the suspection of "silent corruption" - but in such cases, better spot the faulty hardware and replace it (bad disks, bad power supply, bad PSU and the like). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...