From owner-freebsd-questions@FreeBSD.ORG Thu Apr 28 00:26:56 2005 Return-Path: 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 3699A16A4CF for ; Thu, 28 Apr 2005 00:26:56 +0000 (GMT) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id C031743D6D for ; Thu, 28 Apr 2005 00:26:55 +0000 (GMT) (envelope-from cliftonr@lava.net) Received: by malasada.lava.net (Postfix, from userid 102) id 05C24153883; Wed, 27 Apr 2005 14:26:55 -1000 (HST) Date: Wed, 27 Apr 2005 14:26:54 -1000 From: Clifton Royston To: Lisa Casey Message-ID: <20050428002653.GA6733@tikitechnologies.com> Mail-Followup-To: Lisa Casey , freebsd-questions@freebsd.org References: <001b01c54b87$d4653d80$14d71840@lisakc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001b01c54b87$d4653d80$14d71840@lisakc> User-Agent: Mutt/1.4.2i cc: freebsd-questions@freebsd.org Subject: Re: Need help with a swap file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2005 00:26:56 -0000 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