Dedicated Server Forum

The Hivelocity Dedicated Server Discussion Forum is a place for Hivelocity clients to meet and chat about all things server. From server promotions to server issues, our technical staff, sales, billing, management and Upper management will be actively involved in these discussions. No question is too big or small, no topic is too stupid to be discussed here. We want all of our clients to feel like this is their home away from home on the net.


 
 
In order to get support you will need to enter your registration details:
 
Please enter your search criteria:
 
 

Dedicated Server Forums by Hivelocity Award winning Dedicated Server hosting > Dedicated Server Operating Systems Supported by Hivelocity > FreeBSD dedicated Hosting / dedicated server discusssion forum » How do I create swapfile on FreeBSD 4.x ?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-03-2009, 01:15 PM
Administrator
 
Join Date: Jul 2009
Posts: 578
Default How do I create swapfile on FreeBSD 4.x ?


You can create a file of a specified size to use as a swap file. In our example here we will use a 64MB file called /usr/swap0. You can use any name you want.

Be certain that your kernel configuration includes the vnode driver. It is not in recent versions of GENERIC.

pseudo-device vn 1 #Vnode driver (turns a file into a device)


# cd /dev
# sh MAKEDEV vn0

Create a swapfile (/usr/swap0):

# dd if=/dev/zero of=/usr/swap0 bs=1024k count=64

Set proper permissions on (/usr/swap0):

# chmod 0600 /usr/swap0

Enable the swap file in /etc/rc.conf:

swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired.

Reboot the machine or to enable the swap file immediately, type:

# vnconfig -e /dev/vn0b /usr/swap0 swap

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 03:50 AM.