From owner-freebsd-current@FreeBSD.ORG Fri Oct 25 12:50:10 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2A968FED for ; Fri, 25 Oct 2013 12:50:10 +0000 (UTC) (envelope-from rosti.bsd@gmail.com) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA92F23EC for ; Fri, 25 Oct 2013 12:50:09 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id b13so3777740wgh.27 for ; Fri, 25 Oct 2013 05:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=65wTXMT1bvBsUaonWjB+RONv/lm/dOOTSfcd14fW660=; b=y2i5pIlFHc7dnakhZdvT5wIV6yAyd4sZeMriGLZJ1o0kzji3kPtmw11hJ0C+SSEaKl Eku4ms5ljp6kJT7TS3qXGZdEM/4RklI5YvovXX6Wdw4kdpZ9yTTIFcTf52A6DYZY+g2u ZMwrgtkYnQsT2AW0abNsqLuwL89Xdb005R89I4BKMuFq49S/PSfRoNZWvSxLQ7Us7yh+ WPGGB2bYDhxhe0Ud8KjS09L+HT8XCmKJ2ViQZjgqSmRwrGru7cV7s880ZBIkcGUn8GMM iadP7NluJfVM6uVMDyuPCzzF7RrJEfS+puavZ1QcdbYMk6p2SAplDljg/oYTvtwz3oLK yLMQ== MIME-Version: 1.0 X-Received: by 10.180.208.45 with SMTP id mb13mr2371464wic.27.1382705408049; Fri, 25 Oct 2013 05:50:08 -0700 (PDT) Received: by 10.194.216.2 with HTTP; Fri, 25 Oct 2013 05:50:08 -0700 (PDT) Date: Fri, 25 Oct 2013 14:50:08 +0200 Message-ID: Subject: Using a swap file From: Rostislav Krasny To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2013 12:50:10 -0000 Hi there, I've 10.0-BETA1 i386 installed and I want to use a swap file instead of a swap partition. I created /swapfile and I'm able to enable it manually by following commands: mdconfig -a -t vnode -f /swapfile -u 0 swapon /dev/md0 This is according to the following section of the Handbook: http://www.freebsd.org/doc/handbook/adding-swap-space.html It still states that adding swapfile="" into /etc/rc.conf enables that swap file during a boot automatically. However this is already not true for CURRENT and for the upcoming 10.0 release. According to following commit number 252310 this rc.conf parameter is obsolete http://svnweb.freebsd.org/base?view=revision&revision=252310 It introduces different configuration and offers to add a line like following into /etc/fstab md none swap sw,file=/swapfile 0 0 This is what I did but 'swapon -a' still doesn't work. I didn't try to reboot because I build world in other console. But I believe the result will be the same, because /etc/rc.d/swap runs the same command: '/sbin/swapon -aq'. So what is the right way to enable a swap file during a boot and for commands like 'swapon -a' ? Thanks P.S. The Handbook needs to be updated