From owner-freebsd-questions Sat Mar 24 8:31: 1 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id B9F6037B71A for ; Sat, 24 Mar 2001 08:30:58 -0800 (PST) (envelope-from mwm@mired.org) Received: (qmail 4891 invoked by uid 100); 24 Mar 2001 16:30:57 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15036.52160.757281.814574@guru.mired.org> Date: Sat, 24 Mar 2001 10:30:56 -0600 To: Eugene Lee Cc: questions@freebsd.org Subject: Re: resizing a swap partition In-Reply-To: <35076012@toto.iv> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Eugene Lee types: > Does FreeBSD support any tools that can dynamically repartition a drive > while preserving the data in those partitions (assuming there's enough > free space in the new partition layout)? I have a FreeBSD 4.2 machine > with one drive and I'd like to add more swap space (I'm getting lots of > messages saying "/kernel: swap_pager_getswapspace: failed" and lots of > processes saying "was killed: out of swap space"). I couldn't find any > entries in the FAQ or the Handbook to address this. I found a post in > the list archives to create another swap file, but it also warned that > it isn't as efficient as a "native swap partition". Also, even if I > created more swap files, is there a way to instruct the swapper to first > use the swap partition, then use the swap file? > > Any pointers are appreciated, thanks! Nope, there's no easy way to repartition a drive. While FreeBSD is willing to let you change the size of partitions without requiring a reboot, that just physically changes the partition, it doesn't effect the file system. There are tools in development that will let you increase the size of a partition with a file system on it then grow the file system to use all the parition, but that's about it. If you really can't dump and restore the file system that you want to shrink to do this, you can use vn to use a file in the file system as swap space. Detailed, step-by-step instructions are in the FAQ entry on adding swap at . http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message