Welcome to AVR32 Linux... Users Groups

Swapping over the network

How to set up swap over the NetworkBlockDevice (NBD):

  1. Get the NBD package from http://sourceforge.net/project/showfiles.php?group_id=13229
  2. Install the NBD package on the server you want to use and start it (you may use any regular file or block device):
    • # dd if=/dev/zero of=/swaps/mytarget.bin bs=1024 count=65536
    • # nbd-server 1234 /swaps/mytarget.bin
  3. Install the NBD client on the target. Comment out the line in configure.ac and run autoconf if you don't have glib installed for the target compiler.
  4. Load the nbd kernel module on the target and create the /dev/nbd* devices if you're not using mdev or udev:
    • # mknod /dev/nbd0 b 43 0
  5. Run the NBD client on the target:
    • # nbd-client <server-ip> <server-port> /dev/nbd0
  6. Set up swap space on the NBD (only necessary the first time):
    • # mkswap /dev/nbd0
  7. Use the swap space
    • # swapon /dev/nbd0
r4 - 2006-11-16 - 15:23:20 - HaavardSkinnemoen
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.
Syndicate this site RSSATOM