Date: Mon, 26 Nov 2001 19:59:30 -0500 (EST) From: mwlucas@blackhelicopters.org To: FreeBSD-gnats-submit@freebsd.org Subject: docs/32319: FAQ on softupdates and / Message-ID: <200111270059.fAR0xUB44169@blackhelicopters.org>
index | next in thread | raw e-mail
>Number: 32319
>Category: docs
>Synopsis: FAQ on softupdates and /
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 26 17:00:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Michael Lucas
>Release: FreeBSD 3.5-STABLE i386
>Organization:
None
>Environment:
today's -doc tree
>Description:
Yet another message came across -questions about using softupdates on
/.
>How-To-Repeat:
>Fix:
*** en_US.ISO8859-1/books/faq/book.sgml-dist Mon Nov 26 13:03:29 2001
--- en_US.ISO8859-1/books/faq/book.sgml Mon Nov 26 19:55:02 2001
***************
*** 6119,6124 ****
--- 6119,6192 ----
</qandaentry>
<qandaentry>
+ <question id="safe-softupdates">
+ <para>Which partitions can safely use softupdates? I've
+ heard that softupdates on <filename>/</filename> can cause
+ problems.</para>
+ </question>
+
+ <answer>
+ <para>Short answer: you can usually use softupdates safely
+ on all partitions.</para>
+
+ <para>Long answer: There used to be some concern over using
+ softupdates on the root partition. Softupdates has two
+ characteristics that caused this. First, a softupdates
+ partition has a small chance of losing data during a
+ system crash. (The partition will not be corrupted; the
+ data will simply be lost.) Also, softupdates can cause
+ temporary space shortages.</para>
+
+ <para>When using softupdates, the kernel can take up to
+ thirty seconds to actually write changes to the physical
+ disk. If you delete a large file, the file still resides
+ on disk until the kernel actually performs the deletion.
+ This can cause a very simple race condition. Suppose you
+ delete one large file and immediately create another large
+ file. The first large file is not yet actually removed
+ from the physical disk, so the disk might not have enough
+ room for the second large file. You get an error that the
+ partition don't have enough space, although you know
+ perfectly well that you just released a large chunk of
+ space! When you try again mere seconds later, the file
+ creation works as you expect. This has left more than one
+ user scratching his head and doubting his sanity, the
+ FreeBSD filesystem, or both.</para>
+
+ <para>If a system should crash after the kernel accepts a
+ chunk of data for writing to disk, but before that data is
+ actually written out, data could be lost or corrupted.
+ This risk is extremely small, but generally manageable.
+ Use of IDE write caching greatly increases this risk; it
+ is strongly recommended that you disable IDE write caching
+ when using softupdates.</para>
+
+ <para>These issues affect all partitions using softupdates.
+ So, what does this mean for the root partition?</para>
+
+ <para>Vital information on the root partition changes very
+ rarely. Files such as <filename>/kernel</filename> and
+ the contents of <filename>/etc</filename> only change
+ during system maintenance, or when users change their
+ passwords. If the system crashed during the the
+ thirty-second window after such a change is made, it is
+ possible that data could be lost. This risk is negligible
+ for most applications, but you should be aware that it
+ exists. If your system cannot tolerate this much risk,
+ don't use softupdates on the root filesystem!</para>
+
+ <para><filename>/</filename> is traditionally one of the
+ smallest partitions. By default, FreeBSD puts the
+ <filename>/tmp</filename> directory on
+ <filename>/</filename>. If you have a busy
+ <filename>/tmp</filename>, you might see intermittent
+ space problems. Symlinking <filename>/tmp</filename> to
+ <filename>/var/tmp</filename> will solve this
+ problem.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
<question id="add-swap-space">
<para>How can I add more swap space?</para>
</question>
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111270059.fAR0xUB44169>
