From owner-freebsd-doc Mon Nov 26 17: 0:12 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 069DA37B416 for ; Mon, 26 Nov 2001 17:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fAR102W85224; Mon, 26 Nov 2001 17:00:02 -0800 (PST) (envelope-from gnats) Received: from blackhelicopters.org (geburah.blackhelicopters.org [209.69.178.18]) by hub.freebsd.org (Postfix) with ESMTP id B36C737B405 for ; Mon, 26 Nov 2001 16:59:31 -0800 (PST) Received: (from mwlucas@localhost) by blackhelicopters.org (8.11.6/8.11.6) id fAR0xUB44169; Mon, 26 Nov 2001 19:59:30 -0500 (EST) (envelope-from mwlucas) Message-Id: <200111270059.fAR0xUB44169@blackhelicopters.org> Date: Mon, 26 Nov 2001 19:59:30 -0500 (EST) From: mwlucas@blackhelicopters.org Reply-To: mwlucas@blackhelicopters.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/32319: FAQ on softupdates and / Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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 ---- + + 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? >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message