USB swapfile creation
Jjwatmyself (Talk | contribs) (→Instructions) |
Jjwatmyself (Talk | contribs) (→Instructions) |
||
Line 25: | Line 25: | ||
Upgrading Vera's firmware will require setting up the swapfile from scratch as per instructions below. | Upgrading Vera's firmware will require setting up the swapfile from scratch as per instructions below. | ||
− | ==Instructions== | + | == Instructions == |
− | + | ||
− | + | ||
− | Once you are at the SSH commandline, enter these commands one by one. | + | 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]]. |
− | Please note that the forst command can take a few minutes to complete, depending on the speed of your USB stick. | + | |
+ | 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 | dd if=/dev/zero of=/tmp/log/cmh/swapfile bs=1024 count=65536 | ||
− | 2. Creating the actual swapfile: | + | 2. Creating the actual swapfile: |
+ | |||
mkswap /tmp/log/cmh/swapfile | mkswap /tmp/log/cmh/swapfile | ||
− | 3. Start using the newly created swapfile: | + | 3. Start using the newly created swapfile: |
+ | |||
swapon /tmp/log/cmh/swapfile | swapon /tmp/log/cmh/swapfile | ||
− | How to test if swap is enabled: Re-issue the above command and if the file shows busy, then swap is enabled | + | How to test if swap is enabled: Re-issue the above command and if the file shows busy, then swap is enabled |
+ | |||
swapon /tmp/log/cmh/swapfile | swapon /tmp/log/cmh/swapfile | ||
swapon: /tmp/log/cmh/swapfile: Device or resource busy | swapon: /tmp/log/cmh/swapfile: Device or resource busy | ||
− | If for some reason you would like to stop Vera using the swapfile use the following command after SSH-ing into Vera: | + | 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 | swapoff /tmp/log/cmh/swapfile | ||
− | 4. Persistent Swap after reboot: Edit /etc/init.d/usb and insert the following line in the appropriate place: | + | 4. Persistent Swap after reboot: Edit /etc/init.d/usb and insert the following line in the appropriate place: |
− | /sbin/swapon /tmp/log/cmh/swapfile | + | /sbin/swapon /tmp/log/cmh/swapfile |
− | Shown below in /etc/init.d/usb | + | Shown below in /etc/init.d/usb |
− | #!/bin/sh /etc/rc.common | + | # |
− | #Copyright (C) 2006 OpenWrt.org | + | <source lang="">#!/bin/sh /etc/rc.common |
+ | # Copyright (C) 2006 OpenWrt.org | ||
START=39 | START=39 | ||
Line 63: | Line 68: | ||
/sbin/swapon /tmp/log/cmh/swapfile | /sbin/swapon /tmp/log/cmh/swapfile | ||
} | } | ||
− | } | + | }</source> |
==References== | ==References== | ||
please find more info here:<br> | please find more info here:<br> | ||
http://wiki.openwrt.org/doc/howto/usb.storage | http://wiki.openwrt.org/doc/howto/usb.storage |
Revision as of 04:10, 17 December 2012
HOWTO set up a memory swapfile on a USB stick
*NOTE This feature should only be set up by users with large z-wave networks and some knowledge of Linux internal commands. The functionality has been tested by some beta testers if the userforum at http://forum.mios.com, but using the feature should still be done with caution.
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
How to test if swap is enabled: Re-issue the above command and if the file shows busy, then swap is enabled
swapon /tmp/log/cmh/swapfile swapon: /tmp/log/cmh/swapfile: Device or resource busy
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
4. Persistent Swap after reboot: Edit /etc/init.d/usb and insert the following line in the appropriate place:
/sbin/swapon /tmp/log/cmh/swapfile
Shown below in /etc/init.d/usb
Invalid language.
You need to specify a language like this: <source lang="html4strict">...</source>
Supported languages for syntax highlighting:
4cs, abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, clojure, cmake, cobol, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, eiffel, email, erlang, fo, fortran, freebasic, fsharp, gambas, gdb, genero, gettext, glsl, gml, gnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lisp, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, make, mapbasic, matlab, mirc, mmix, modula3, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, ocaml, ocaml-brief, oobas, oracle11, oracle8, pascal, per, perl, perl6, php, php-brief, pic16, pike, pixelbender, plsql, povray, powerbuilder, powershell, progress, prolog, properties, providex, purebasic, python, qbasic, rails, rebol, reg, robots, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xml, xorg_conf, xpp, z80
References
please find more info here:
http://wiki.openwrt.org/doc/howto/usb.storage