From owner-svn-doc-head@FreeBSD.ORG Mon Jun 9 03:42:29 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F10BA283; Mon, 9 Jun 2014 03:42:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFE432580; Mon, 9 Jun 2014 03:42:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s593gTSs044107; Mon, 9 Jun 2014 03:42:29 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s593gTXH044106; Mon, 9 Jun 2014 03:42:29 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201406090342.s593gTXH044106@svn.freebsd.org> From: Warren Block Date: Mon, 9 Jun 2014 03:42:29 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r45036 - head/en_US.ISO8859-1/books/handbook/config X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 03:42:30 -0000 Author: wblock Date: Mon Jun 9 03:42:29 2014 New Revision: 45036 URL: http://svnweb.freebsd.org/changeset/doc/45036 Log: Add an example for 10.x swap files, clarify the existing examples for 9.x, use procedure instead of orderedlist, and factor out common parts. PR: 190759 Submitted by: p5B2E9A8F@t-online.de Modified: head/en_US.ISO8859-1/books/handbook/config/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/config/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/config/chapter.xml Mon Jun 9 00:30:05 2014 (r45035) +++ head/en_US.ISO8859-1/books/handbook/config/chapter.xml Mon Jun 9 03:42:29 2014 (r45036) @@ -1483,7 +1483,7 @@ cron.* For more information on all fields, valid flags, and how to specify the rotation time, refer to &man.newsyslog.conf.5;. Since newsyslog is run from - &man.cron.8;, it can not rotate files more often than it is + &man.cron.8;, it cannot rotate files more often than it is scheduled to run from &man.cron.8;. @@ -2757,55 +2757,85 @@ kern.maxvnodes: 100000 Creating a Swap File - To instead create a swap file, specify its size. The - following example creates a 64MB file named - /usr/swap0. + These examples create a 64M swap file + called /usr/swap0 instead + of using a partition. + + Using swap files requires that the module needed by + &man.md.4; has either been built into the kernel or has been + loaded before swap is enabled. See + for information about building + a custom kernel. + + + Creating a Swap File on &os; 10.<replaceable>X</replaceable> and Later + + + + Create the swap file: - - Creating a Swap File on &os; + &prompt.root; dd if=/dev/zero of=/usr/swap0 bs=1m count=64 + - - - The GENERIC kernel already - includes the required memory disk driver. When building - a custom kernel, make sure to include the following line - in the custom configuration file: + + Set the proper permissions on the new file: - device md + &prompt.root; chmod 0600 /usr/swap0 + - For information on building a custom kernel, refer - to . - + + Inform the system about the swap file by adding a + line to /etc/fstab: + + md99 none swap sw,file=/usr/swap0 0 0 + + The &man.md.4; device md99 is + used, leaving lower device numbers available for + interactive use. + + + + Swap space will be added on system startup. To add + swap space immediately, use &man.swapon.8;: + + &prompt.root; swapon -aq + + + - + + Creating a Swap File on &os; 9.<replaceable>X</replaceable> and Earlier + + + Create the swap file, /usr/swap0: - &prompt.root; dd if=/dev/zero of=/usr/swap0 bs=1024k count=64 - + &prompt.root; dd if=/dev/zero of=/usr/swap0 bs=1m count=64 + - - Then, set proper permissions on + + Set the proper permissions on /usr/swap0: &prompt.root; chmod 0600 /usr/swap0 - + - + Enable the swap file in /etc/rc.conf: swapfile="/usr/swap0" # Set to name of swap file - + - - To enable the swap file immediately, specify a free + + Swap space will be added on system startup. To enable the swap file immediately, specify a free memory device. Refer to for more information about memory devices. &prompt.root; mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0 - - + + @@ -2911,7 +2941,7 @@ kern.maxvnodes: 100000 In &os; the &man.acpi.4; driver is loaded by default at system boot and should not be compiled - into the kernel. This driver can not be unloaded after boot + into the kernel. This driver cannot be unloaded after boot because the system bus uses it for various hardware interactions. However, if the system is experiencing problems, ACPI can be disabled altogether