USB swapfile creation

From MiOS
Revision as of 17:27, 2 July 2011 by Henk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


HOWTO set up a memory swapfile on a USB stick

Contents

Prerequisites

  • Vera 2 hardware
  • Vera firmware 1.1.1245 or later
  • USB stick attached to Vera

Introduction

Heres a short manual on how to set up a memory swap file on a USB stick to allocate more memory for your Vera. This is an additional feature once you have set up USB logging for Vera as described here: Store_logs_USB

The instructions contain commands for 4 indivudual steps.

Data description for 64Mb swapfile Creating swapfile Start using swapfile Stop using a swapfile.

Please note that rebooting Vera will require a manual start of the swapfile. Upgrading Vera's firmware will require setting up the swapfile from scratch as per instructions below.

Instructions

To set up a swapfile for Vera to use after you have have enabled to store logs on a USB stick as described here: Store_logs_USB it is required to SSH into your Vera. This procedure is explained here: Logon_Vera_SSH.

Once you are at the SSH commandline, enter these commands one by one. Please note that the forst command can take a few minutes to complete, depending on the speed of your USB stick.

1. Data description for 64Mb swapfile for the filesystem:

dd if=/dev/zero of=/tmp/log/cmh/swapfile bs=1024 count=65536

2. Creating the actual swapfile:

mkswap /tmp/log/cmh/swapfile	

3. Start using the newly created swapfile:

swapon /tmp/log/cmh/swapfile

If for some reason you would like to stop Vera using the swapfile use the following command after SSH-ing into Vera:

swapoff /tmp/log/cmh/swapfile					


References

please find more info here:
http://wiki.openwrt.org/doc/howto/usb.storage

Personal tools