From owner-freebsd-questions Mon Feb 10 1: 9:15 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35E5937B401 for ; Mon, 10 Feb 2003 01:09:14 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EC6143F85 for ; Mon, 10 Feb 2003 01:07:52 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id h1A97lnZ048943 for ; Mon, 10 Feb 2003 09:07:47 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id h1A97lBO048942 for freebsd-questions@FreeBSD.ORG; Mon, 10 Feb 2003 09:07:47 GMT Date: Mon, 10 Feb 2003 09:07:47 +0000 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Subject: Re: I'm running out of swapspace Message-ID: <20030210090747.GB48543@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: <20030210004609.V41846-100000@amour.ath.cx> <3E46EC14.9090702@ameritech.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E46EC14.9090702@ameritech.net> User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-3.0 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01, USER_AGENT,USER_AGENT_MUTT version=2.44 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Feb 09, 2003 at 07:02:28PM -0500, northern snowfall wrote: > One way to do it is to create a memory file system linked to a file on-disk. > In FreeBSD 5.0-RELEASE, to create a 128MB additional swap space, I've tried: > dd if=/dev/zero of=/swap0 count=128 bs=1m > chmod 600 /swap0 > mdconfig -a -t vnode -f /swap0 -u 3 > swapon /dev/md3 > This will link the 128 megabyte file into swap space recognized by the > system. > Execute "swapinfo" to confirm: > sandstone.north_ % swapinfo > Device 1K-blocks Used Avail Capacity Type > /dev/ad0s1b 524288 10136 514152 2% Interleaved > /dev/md3 131072 1876 129196 1% Interleaved > Total 655360 12012 643348 2% > sandstone.north_ % Cool. But mdconfig is new in 5.0. The equivalent way of doing this in 4.x would be: dd if=/dev/zero of=/swap0 count=128 bs=1m chmod 600 /swap0 vnconfig -e vn0c /swap0 swap where vnconfig(8) automatically does the swapon step for you. vnconfig(8) still exists in 5.0, but all it will do is print a message saying to use mdconfig(8). Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message