Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Mar 2001 10:30:56 -0600
From:      Mike Meyer <mwm@mired.org>
To:        Eugene Lee <eugene@anime.net>
Cc:        questions@freebsd.org
Subject:   Re: resizing a swap partition
Message-ID:  <15036.52160.757281.814574@guru.mired.org>
In-Reply-To: <35076012@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Eugene Lee <eugene@anime.net> 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 <URL:
http://www.freebsd.org/FAQ/admin.html#ADD-SWAP-SPACE >.

	<mike
--
Mike Meyer <mwm@mired.org>			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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15036.52160.757281.814574>