> > On Nov 29, 2011, at 10:45 AM, tovis wrote: > > tovis: > > I am interested in minimizing writes to a boot flash drive as well. I have a Seagate Dockstar (arm5, 128 MB RAM) that boots Debian wheezy from a usb flash drive. It runs rtorrent, sabnzbd, and rsync. These programs operate on files that are on two external usb hard disks, but they also cause lots of writes to the flash drive, and I'm concerned that this will lead to premature flash drive death. > > >> About "my" technology to minimize writes on USB: >> 1. In the /etc/rcS.d/ I have put my little script for mounting aufs on /var immediately after S07checkroot (after checkroot script USB as root is >> mounted rw). Instantly I have do the next: >> mount -t tmpfs none /mnt/var >> tar -xzf /boot/aufs_mnt_var.tar.gz >> mount -t aufs -o br:/mnt/var:/var=rw none /var > > > Can you go into a little more detail here? My system has S06checkroot.sh. Do I put the lines > > mount -t tmpfs none /mnt/var > tar -xzf /boot/aufs_mnt_var.tar.gz > mount -t aufs -o br:/mnt/var:/var=rw none /var > > somewhere in the file S06checkroot.sh? Or am I misunderstanding? You can, but be aware the on the next safe-upgrade the script could be overwritten by new one! Better use a new additional script, and put it using update-rc.d. You should put it as close as possible after the checkroot.sh - as USB become writable. The simplest way to use checkroot.sh as a template, copy with new name, clear unneeded stuff, correct "header" and put excerpt in "do_start ()" function - it would be called at start. (Be careful, read man, update-rc.d a little bit annoying I have used it as #update-rc.d scriptname start 07 S and playing with script name to have best result) > > >> 2. In the /etc/fstab I have mount over /tmp tmpfs. > > > I don't quite understand what you're saying here. Can you show me the actual lines from /etc/fstab? > You can mount anything "over" an existing folder, if something in that folder it will gone, and replaced with new contents - that is what I have called "over mount" - may be not such a lucky name. My fstab line for /tmp seen like this:
tmpfs /tmp tmpfs defaults 0 0 > Thank you! :) > > -Bo Parker > fbpar...@hiwaay.net > Some more trick. The /mnt/var I have made explicitly, and MOVE files from /var (with copy folders) - as they reside at /var. After I make a tarball and save it to /boot. The result, you can check using "cat /proc/diskstats" starting from 5th field data about completed writes (contents of this is described in kernel documentation at file iostats.txt) You can check what happend to your branch, which files were written using stat command, after one - two day of running. Sincerely tovis ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d