Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Apr 2005 14:26:54 -1000
From:      Clifton Royston <cliftonr@tikitechnologies.com>
To:        Lisa Casey <lisa@jellico.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Need help with a swap file
Message-ID:  <20050428002653.GA6733@tikitechnologies.com>
In-Reply-To: <001b01c54b87$d4653d80$14d71840@lisakc>
References:  <001b01c54b87$d4653d80$14d71840@lisakc>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 27, 2005 at 08:18:40PM -0400, Lisa Casey wrote:
> I think I screwed up. Perhaps someone here can help me. I need more swap
> space on my FreeBSD 4.6 box. I followed the directions at
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-space.html
> for "Creating a swapfile for FreeBSD 4.X".  The example given in the
> handbook was for a 64 MG swapfile. I wanted to create a 200 MG swapfile. So
> for the command in the example that says:
> # dd if=/dev/zero of=/usr/swap0 bs=1024k count=64
> I typed instead:
> # dd if=/dev/zero of=/usr/swap0 bs=1024k count=200

  I would just about bet you typoed the "k" and instead typed 
   ... bs=1024 count=200

  This would have resulted in a 200Kb file, which is exactly what
you've got below.
 
...
> When I look at the size of the swap0 file I created in /usr, it is not the
> 200 MG I thought I was getting:
> 
> -rw-------    1 root  wheel  204800 Apr 27 15:58 swap0
> 
> How can I undo this and redo it? What do I need to do to do it RIGHT this
> time??

from man swapon on 4.x

BUGS

     There is no way to stop paging and swapping on a device.  It is therefore
     not possible to dismount swap devices which are mounted during system
     operation.

  Regrettably, you will need to shutdown your system and reboot it to
clear this problem.  Assuming you haven't put anything vn-related into
your startup or your fstab, it will come up with only the previous swap
you had configured.

  All the steps you followed looked right, so after rebooting if you go
through it again, you should be fine.  Next time just make sure you
really get a 200MB file before you turn it into a vn device.  

  -- Clifton

-- 
          Clifton Royston  --  cliftonr@tikitechnologies.com 
         Tiki Technologies Lead Programmer/Software Architect
"I'm gonna tell my son to grow up pretty as the grass is green
And whip-smart as the English Channel's wide..."
                                            -- 'Whip-Smart', Liz Phair



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