Install the nbd-server if it is not installed. In Debian, do apt-get install nbd-server. Then create the swap file in the server.
dd if=/dev/zero of=/home/at91/rootfs/swap count=128 bs=1024k
Activate the server. You can choose any port.
nbd-server 1100 /home/at91/rootfs/swap
In the client, install the software.
apt-get install nbd-client
Create the /dev entry.
mknod /dev/nbd0 b 43 0
You'll need NBD in the kernel.
CONFIG_BLK_DEV_NBD=m
Insert the module.
modprobe nbd
Mount the remote device:
nbd-client 192.168.0.102 1100 /dev/nbd0
Format the swap partition.
mkswap /dev/nbd0
Activate the swap area.
swapon /dev/nbd0
This tip was written by Andrés Calderón.
Last update: 2006-12-03 (Rev 9)
