frase.id.au archives

January 2009

May 2008

March 2008

January 2008

November 2007

September 2007

August 2007

May 2007

September 2006

June 2006

May 2006

April 2006

March 2006

February 2006

January 2006

December 2005

November 2005

October 2005

September 2005

August 2005

July 2005

June 2005

May 2005

April 2005

March 2005

February 2005

January 2005

December 2004


frase.id.au archives for January 2009:



Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/ACT' for 'EST/10.0/no DST' instead in /store/1/www/frase.id.au/archives/content.php on line 35

12-01-2009 - NFS-backed swap on FreeBSD (frase)



Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/ACT' for 'EST/10.0/no DST' instead in /store/1/www/frase.id.au/common/functions.php on line 76

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/ACT' for 'EST/10.0/no DST' instead in /store/1/www/frase.id.au/common/functions.php on line 77

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/ACT' for 'EST/10.0/no DST' instead in /store/1/www/frase.id.au/common/functions.php on line 78

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/ACT' for 'EST/10.0/no DST' instead in /store/1/www/frase.id.au/common/functions.php on line 78

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/ACT' for 'EST/10.0/no DST' instead in /store/1/www/frase.id.au/common/functions.php on line 80

Monday 12-01-2009

NFS-backed swap on FreeBSD

comments (0) »

Posted by frase @ 22:35 on 12-01-2009

To setup an NFS-based swapfile on FreeBSD.

on NFS server:

mkdir /var/swap
dd bs=1024 count=256000 if=/dev/zero of=/var/swap/swapfile

Set appropriate owner/permissions on the file and edit /etc/exports to export the file. Substitute desired values for count or path.

on client:

mkdir /tmp/swap
mount -t nfs server:/var/swap/swapfile /tmp/swap
mdconfig -f /var/swap/swapfile
swapon /dev/md%d

This mounts the file, creates a file-backed memory disk and enables swap on the device, where %d is the device number shown in the mdconfig output (`mdconfig -l` will list all md(4) devices).

To disable swapping and unmount:

swapoff /dev/md%d
mdconfig -d -u %d
umount /tmp/swap