From owner-freebsd-questions@FreeBSD.ORG Sat Dec 2 01:42:50 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 C3A7F16A415 for ; Sat, 2 Dec 2006 01:42:50 +0000 (UTC) (envelope-from smurphy@calarts.edu) Received: from echo.calarts.edu (echo.calarts.edu [198.182.157.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28DB343CA2 for ; Sat, 2 Dec 2006 01:42:33 +0000 (GMT) (envelope-from smurphy@calarts.edu) Received: from echo.calarts.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 43F67101E42C; Sat, 2 Dec 2006 01:38:47 +0000 (GMT) Received: from muse2.calarts.edu (muse2.calarts.edu [198.182.157.28]) by echo.calarts.edu (Postfix) with ESMTP id F30121019069; Sat, 2 Dec 2006 01:38:44 +0000 (GMT) Received: from [172.24.0.177] ([172.24.0.177]) (authenticated bits=0) by muse2.calarts.edu (8.13.3/8.13.3) with ESMTP id kB21glXa099054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 1 Dec 2006 17:42:47 -0800 (PST) (envelope-from smurphy@calarts.edu) Message-ID: <4570DA18.6070505@calarts.edu> Date: Fri, 01 Dec 2006 17:42:48 -0800 From: Sean Murphy User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Chuck Swiger References: <4570C4D6.5030708@calarts.edu> <671FF6D7-8F30-44DF-A8ED-2456E9B80170@mac.com> In-Reply-To: <671FF6D7-8F30-44DF-A8ED-2456E9B80170@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.52 on 198.182.157.28 Cc: freebsd-questions@freebsd.org Subject: Re: Soft Updates Help 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: Sat, 02 Dec 2006 01:42:50 -0000 Chuck Swiger wrote the following on 12/1/2006 4:25 PM: > On Dec 1, 2006, at 4:12 PM, Sean Murphy wrote: >> I have read up on soft updates and have some questions. >> >> The way that I am understanding soft updates purpose is to allow file >> systems to be mounted dirty after an unclean shutdown of the system. >> This will allow fsck to run in the background to restore the >> consistency of the file system which is compared against a snapshot >> of the system. It also increases performance of heavily written file >> systems by waiting to write the metadata of files and directories >> until a more opportune time. >> >> I have questions about this. >> >> When is the snapshot taken, how often, do I have to do it or does a >> program or kernel do it? > > Snapshots are taken via mksnap_ffs; some other tools like fsck or dump > also know how to create a snapshot. > >> If this is a safe way to restore consistency why is it not used on /? > > You could enable softupdates on /, but normally one does not as / does > not contain files which are expected to change. > >> If a file system is not heavily written to is it better not to use >> soft updates? > > Maybe. I think that softupdates is a win in almost all circumstances > from the standpoint of data consistency, short of fully syncronous > data & metadata updates. > >> How do I know when the background fsck is finished and if it was >> successful? > > Check the logfiles. > >> Do I have to add anything to enable the backgound fsck? > > At one point, there was an option in /etc/rc.conf, but it now defaults > to being on: > > % grep fsck /etc/defaults/rc.conf > fsck_y_enable="NO" # Set to YES to do fsck -y if the initial > preen fails. > background_fsck="YES" # Attempt to run fsck in the background where > possible. > background_fsck_delay="60" # Time to wait (seconds) before starting > the fsck. > >> When file systems are mounted dirty and our being used while the >> backgound fsck is running on the file systems how does it prevent >> files from being lost? > > The background fsck is only capable of handling innocuous filesystem > inconsistencies, and will fail with an error code if it encounters a > more significant issue, in which case the system is obligated to > perform the traditional fsck in the foreground. > > ---Chuck > Thank you for your knowledge on this issue. I have a few questions that I need your help to clarify. "Snapshots are taken via mksnap_ffs; some other tools like fsck or dump also know how to create a snapshot." OK, so if I understand this correctly I do not have to initially take a snapshot and update this snapshot manually. The files system with soft updates does it correct? "Maybe. I think that softupdates is a win in almost all circumstances from the standpoint of data consistency, short of fully syncronous data & metadata updates." On this issue, if I do not have soft updates on does that make it a fully synchronous file system? If the background fsck can't handle the inconsistencies it will report this in the /var/log/messages correct? Then is the file system unmounted because of the inconsistency to prevent data loss, so I can run a manual fsck or does it stay mounted? Thanks