[Voyage-linux] Working with AUFS

Russell Lang (spam-protected)
Tue Jan 6 18:35:51 HKT 2009


If you need a directory that will be copied back to flash on shutdown, see 
Punky's response to my question:
  http://list.voyage.hk/pipermail/voyage-linux/2008-December/002750.html
Have a look at how aufs overlays a tmpfs directory mounted in /lib/init/rw over 
the target directory.  The problem is writing back to flash, which is done by 
remounting rw, using rsync to copy the aufs union, unmounting the aufs union, 
then using rsync to copy the files to the underlying flash.

This won't work for power failures.  My plan to cope with this is to plug in a USB 
flash memory device, and to have it mounted readwrite.  This will be a 
consumable that should be replaced every few years.  To minimise writes to the 
flash memory, I'm intending to write to RAM on every transaction, and then once 
a day to copy that to flash memory.

If you are going to write direct to flash all the time, calculate how many writes per 
day you will do, and predict the life of the flash memory.

Russell


On 6 Jan 2009 at 11:21, dju wrote:

> Hello 
> 
>  the easy way
>  in the file /etc/init.d/voyage-util
> 
>  modify 
> echo -n "Remounting / as read-only ... "
> /usr/local/sbin/remountro
> 
>  by
> echo -n "Remounting / as read-write ... "
> /usr/local/sbin/remountrw
> 
> --
>  dju
> 
>  
> On Tue, 6 Jan 2009 09:46:38 -0000, "Robert Rawlins"
> <robert.rawlins at thinkbluemedia.co.uk> said:
> > Morning guys,
> > 
> >  
> > 
> > We're currently working with Voyage 5x which seems to work quite nicely
> > for
> > us, however I can see some upcoming benefits of us using the new 6x
> > release
> > and I wanted to try and clear up a few questions about the new file
> > system
> > which is implemented on the new release.
> > 
> >  
> > 
> > In our application for Voyage we use MySQL to collect data, this is then
> > written to the disk and must remain there after a reboot. At the moment
> > we've always taken care of this by using the WIKI document found here
> > http://wiki.voyage.hk/dokuwiki/doku.php?id=remove_ro which is an anything
> > but ideal situation but has always worked well for us.
> > 
> >  
> > 
> > Now, I assume that with this new move to AUFS it's about time we started
> > doing things properly. At the moment I understand next to nothing about
> > AUFS
> > and how it works but I'm hoping we'll be able to configure it for our
> > needs.
> > 
> >  
> > 
> > If you guys had data you needed to persist on the disk regardless of a
> > reboot or power loss how would you go about it? I know we've talked in
> > the
> > past about having a secondary scratch partition on the disk which we use,
> > is
> > this still our best option? Or does AUFS give us some better
> > configuration
> > options to set some space aside on the same partition as the OS?
> > 
> >  
> > 
> > Aside from the MySQL database which we need to persist I also have a
> > bunch
> > of log files and some XML configuration files generated by our
> > application
> > which we need to keep permanently, other than that most changes can be
> > lost.
> > 
> >  
> > 
> > I'm looking for a solution which is easy to implement and also simple to
> > replicate so we can duplicate the cards quickly.
> > 
> >  
> > 
> > Many thanks guys, I appreciate any pointers.
> > 
> >  
> > 
> > Robert
> > 
> 
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux


Russell Lang                   gsview at ghostgum.com.au
Ghostgum Software Pty Ltd      http://www.ghostgum.com.au/





More information about the Voyage-linux mailing list