[mythtv-users] New Frontend, Any gotchas with Compact Flash storage

Mike Isely isely at isely.net
Mon Mar 3 22:53:19 UTC 2008


On Mon, 3 Mar 2008, Paul Bender wrote:

> Matthew Asplund wrote:
> > 
> > 
> > Would things be better if there was a small disk in RAM for stuff like 
> > /tmp and /var? Then you could pretty much have / be a read-only file 
> > system, with all writable stuff copied in the ramdisk and then lost on 
> > reboot.

This is in fact exactly what I did when I set up my two diskless 
front-ends which share the same NFS root file system on the back end.  
I'm a Debian user and the "stock" Debian setup has a tmpfs partition 
pre-configured for a few things like this already (ifupdown state).  It 
was just a matter of identifying other similar areas and sym-linking 
appropriately.  I also wrote a tiny little startup script that uses 
rsync to copy a template mirror hierarchy (very very small - to set up 
the in-RAM structure and for a few tiny bits of initialized read/write 
data) into the ram disk so that the symbolic links automatically point 
to the correct valid subtrees.

One really slick added bonus is that even after all that, the system is 
still 99% maintainable as a normal stock Debian installation (so far).


> 
> Essentially, that is what live distributions as well as MiniMyth do, 
> albeit in a somewhat different fashion. They create a RAM disk that they 
> overlay on the entire root file system using a stackable file system 
> such as unionfs. This makes the entire file system appear to be 
> read-write. However, all changes are lost after reboot.

I thought about this approach (i.e. use unionfs).  I also thought about 
just shrinking the entire root fs down small enough that it could just 
live entirely in RAM.  But in the end (1) I didn't like the idea of 
having to pull an out-of-tree driver (unionfs) into the kernel, and (2) 
I would need probably at least 2GB of RAM on the FE to make the 
full-time root ramdisk viable.  I also thought making a true read-only 
NFS root would be really cool :-)  The implementation turned out easier 
than I had originally guessed.  (And I've since applied the lessons to 
another Linux project at my day-job, so it was a double-bonus...)

What I have running now has only been online (i.e. wife and kids are 
accessing it) for the past week, but so far it is working extremely 
well.

A few people have asked me for details on this, and I will write up some 
web pages about it.  If there is a lot of interest here I can post a 
link when it's ready.  Probably this weekend I should be able to 
complete the description & the steps.

  -Mike


-- 

Mike Isely
isely @ pobox (dot) com
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8


More information about the mythtv-users mailing list