Subject: Re: FFS soft-dependencies in chap-boot?
To: None <netbsd-docs@netbsd.org>
From: Daniel de Kok <daniel@evilbsd.net>
List: netbsd-docs
Date: 01/14/2004 19:03:49
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Jan 14, 2004 at 07:02:38PM +0100, Daniel de Kok wrote:
> On Wed, Jan 14, 2004 at 12:00:12PM -0500, Jan Schaumann wrote:
> [snip]
> > What does ``written away'' mean?  This should be explained.
> > 
> > Maybe some links to websites explaining file systems and FFS in
> > particular?
> 
> Good points. I have changed it to ``written to disk'' and added
> some references.
> 
> How does it look now?

I think I forgot something ;).

--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="chap-boot.xml.diff"

Index: chap-boot.xml
===================================================================
RCS file: /cvsroot/htdocs/guide/en/chap-boot.xml,v
retrieving revision 1.8
diff -b -u -r1.8 chap-boot.xml
--- chap-boot.xml	10 Jan 2004 22:04:47 -0000	1.8
+++ chap-boot.xml	14 Jan 2004 17:56:55 -0000
@@ -405,6 +405,73 @@
   <!-- ============================================================= -->
 
   <sect1>
+    <title>Enabling FFS soft-dependencies</title>
+
+    <para>
+      This might be a good point to enable soft-dependencies for FFS 
+      filesystems. By default FFS filesystems are mounted synchronously, which
+      means that meta-data is written to disk immediately. Soft-dependencies 
+      is a mechanism which does not write meta-data to disk immediately, but it
+      is written in an ordered fashion, which keeps the filesystem consistent.
+      This provides performance comparable to asynchronous mounts, without 
+      the same risks. Soft-dependencies can be enabled by adding
+      <varname>softdep</varname> to the filesystem options in
+      <filename>/etc/fstab</filename>. Let's look at an example of
+      <filename>/etc/fstab</filename>:
+    </para>
+
+    <screen>
+/dev/wd0a / ffs rw 1 1
+/dev/wd0b none swap sw 0 0
+/dev/wd0e /var ffs rw 1 2
+/dev/wd0f /tmp ffs rw 1 2
+/dev/wd0g /usr ffs rw 1 2
+    </screen>
+
+    <para>
+      Suppose we want to enable soft-dependencies for all filesystems,
+      except for the <filename>/</filename> partition, we would change
+      it to (changes are emphasized):
+    </para>
+
+    <screen>
+/dev/wd0a / ffs rw 1 1
+/dev/wd0b none swap sw 0 0
+/dev/wd0e /var ffs rw<emphasis>,softdep</emphasis> 1 2
+/dev/wd0f /tmp ffs rw<emphasis>,softdep</emphasis> 1 2
+/dev/wd0g /usr ffs rw<emphasis>,softdep</emphasis> 1 2
+    </screen>
+
+    <para>
+      These are some references for more information about filesystems
+      and softupdates:
+    </para>
+
+    <itemizedlist>
+      <listitem>
+	<para>
+	  The wikipedia filesystem page:
+	  <ulink url="http://en.wikipedia.org/wiki/File_system">http://en.wikipedia.org/wiki/File_system</ulink>
+	</para>
+      </listitem>
+      <listitem>
+	<para>
+	  The Filesystems HOWTO:
+	  <ulink url="http://www.tldp.org/HOWTO/Filesystems-HOWTO.html">http://www.tldp.org/HOWTO/Filesystems-HOWTO.html</ulink>
+	</para>
+      </listitem>
+      <listitem>
+	<para>
+	  Marshall Kirk McKusick's page about soft dependencies:
+	  <ulink url="http://www.mckusick.com/softdep/">http://www.mckusick.com/softdep/</ulink>
+	</para>
+      </listitem>
+    </itemizedlist>
+  </sect1>
+
+  <!-- ============================================================= -->
+
+  <sect1>
     <title>Rebooting the system</title>
 
     <para>In this first session you have</para>

--qMm9M+Fa2AknHoGS--