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

leave a comment »

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

Leave a comment »









Enable .png support!