hi,
On Tue, Jan 11, 2000 at 05:41:59PM -0800, Matthew Dillon wrote:
> :I just discovered some strange points about using vn devices (files) as
> :swap devices.
> :
> :I have placed below some output gathered with script(1) and now
> :some comments.
> :
> :1) I can easy unconfigure vn device which already mounted as swap device
> :and then remove swapfile without any problems. I not sure about behaviour
> :of the swapper when it will try to allocate swap from /dev/vn0c.
> :
> :2) When I am creating small file (about 100k) and try to mount it as swap
> :device swapinfo(8) output looks broken.
> :
> :3) I could not mount three and more vn devices as swap devices.
> :
> :BTW, I also got strange results once (but I could not reporoduce it later):
> :swapinfo(8) shown that I have three swap devices mounted: /dev/wd0s1b,
> :/dev/rvn0c and /dev/#46:10. What's that ? I'll try to reproduce it again,
> :but ...
> :
> :Comments ?
>
> Don't unconfigure a VN device mounted as swap unless you want your
> system to die a horrible death. It shouldn't allow it to happen, but
> it does and that's a bug.
Yep, I think swapon(8) should fail in this case with something like "File is
busy".
> The first 128K of any swap partition is left alone by the swap subsystem
> in order to ensure that the disklabel (if any) is not overwritten. Do
> not configure tiny swap spaces -- apart from being useless they will
> cause swapinfo to print confusing output.
Why swapon(8) not handling that situation ? I mean check for vn device and
its file size and then generating fatal error if its size less than 128k.
Is it possible ?
> By default the kernel is configured to support 4 SWAP partitions.
How can I enable more swaps ?
> Therefore you can only configure a maximum of 4 SWAP partiions. You
> can change this in the kernel config. Note however that setting the
> number arbitrarily high will cause a huge amount of KVM to be wasted.
> Four is usually enough for anyone.
BTW, I have described following porblem: I have one physical swap slice
and tried to create three additional swapfiles. But I could not. System
allowed me to create only 2 swapfiles, not 3 as you noted above.
--
/* Alexey Zelkin && [EMAIL PROTECTED] */
/* Tavric National University && [EMAIL PROTECTED] */
/* http://www.ccssu.crimea.ua/~phantom && [EMAIL PROTECTED] */
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message