From ab52f82026bd5939d09faf21bdec205989c304f8 Mon Sep 17 00:00:00 2001 From: Giorgos Keramidas Date: Tue, 27 Nov 2001 02:21:16 +0000 Subject: [PATCH] Add an entry that describes why softupdates is dangerous to use on the root filesystem. PR: docs/32319 Submitted by: Michael Lucas --- en_US.ISO8859-1/books/faq/book.sgml | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/en_US.ISO8859-1/books/faq/book.sgml b/en_US.ISO8859-1/books/faq/book.sgml index 46ae1bc60a..7ef9e5cc7e 100644 --- a/en_US.ISO8859-1/books/faq/book.sgml +++ b/en_US.ISO8859-1/books/faq/book.sgml @@ -6118,6 +6118,74 @@ C:\="DOS" + + + Which partitions can safely use softupdates? I've + heard that softupdates on / can cause + problems. + + + + Short answer: you can usually use softupdates safely + on all partitions. + + 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. + + 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. + + 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. + + These issues affect all partitions using softupdates. + So, what does this mean for the root partition? + + Vital information on the root partition changes very + rarely. Files such as /kernel and + the contents of /etc 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! + + / is traditionally one of the + smallest partitions. By default, FreeBSD puts the + /tmp directory on + /. If you have a busy + /tmp, you might see intermittent + space problems. Symlinking /tmp to + /var/tmp will solve this + problem. + + + How can I add more swap space?