From owner-freebsd-questions@FreeBSD.ORG Tue Mar 31 06:30:06 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 571B2106566B for ; Tue, 31 Mar 2009 06:30:06 +0000 (UTC) (envelope-from crapsh@monkeybrains.net) Received: from ape.monkeybrains.net (mail.monkeybrains.net [208.69.40.9]) by mx1.freebsd.org (Postfix) with ESMTP id 3E0F98FC16 for ; Tue, 31 Mar 2009 06:30:06 +0000 (UTC) (envelope-from crapsh@monkeybrains.net) Received: from [192.168.2.105] (adsl-76-203-172-200.dsl.pltn13.sbcglobal.net [76.203.172.200]) (authenticated bits=0) by ape.monkeybrains.net (8.14.1/8.14.1) with ESMTP id n2V6EaFW010245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Mar 2009 23:14:36 -0700 (PDT) (envelope-from crapsh@monkeybrains.net) Message-ID: <49D1B4C7.1000903@monkeybrains.net> Date: Mon, 30 Mar 2009 23:14:31 -0700 From: Rudy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: manish jain References: <49D1B297.8060307@gmail.com> In-Reply-To: <49D1B297.8060307@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on pita.monkeybrains.net X-Virus-Status: Clean Cc: freebsd-questions@freebsd.org Subject: Re: Question about forcing fsck at boottime X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 06:30:07 -0000 manish jain wrote: > > Hi, > > I am migrating from Linux and am still learning the basics of FreeBSD. > One thing that I would to carry over from my Linux days is to force an > fsck on all filesystems at system startup. On Linux, this was simply a > matter of editing /etc/rc.sysinit. Things seem a bit more complicated > in the BSD world. Can somebody please point me in the right direction ? man fsck Traditionally, fsck is invoked before the file systems are mounted and all checks are done to completion at that time. If background checking is available, fsck is invoked twice. It is first invoked at the traditional time, before the file systems are mounted, with the -F flag to do check- ing on all the file systems that cannot do background checking. Also, you can set this in /etc/rc.conf fsck_y_enable="YES" if you want to automatically run 'fsck -y' ... handy for remote servers. Oh, and if you use ZFS, there is no such thing as 'fsck'. That file system never needs fsck. :) If you want less fsck headaches on a big disk system, make the large partion (/home ?) ZFS. http://en.wikipedia.org/wiki/Zfs http://wiki.freebsd.org/ZFSQuickStartGuide Rudy