[mythtv-users] Multiple diskless frontends off one image

Raymond Wagner raymond at wagnerrp.com
Fri Mar 18 21:20:57 UTC 2011


Robin Gilks <g8ecj at gilks.org> wrote:
> I want to add another frontend, a second diskless Ztoac ION m/b. I'm
> currently doing a diskless network boot (keeps the noise down) and would
> like to do the same again for the new frontend which is identical, in
> hardware terms anyway, but without having to maintain another 2G of image
> on the main backend/server. Disk space is not the issue, keeping things in
> sync is!!
>
> I would guess I'd need to have separate /var, /tmp and maybe /etc and
> /home directories with /usr, /sbin, /opt, /mnt and /lib as common ones.
> Does this sound reasonable and just how do I do it? (I'm sure someone here
> has done it before!!). Something has to get the mounts in the right order
> during boot so I'm hoping this is a wheel I don't have to re-invent :)

I took the 'easy' way out.  I have an iSCSI server set up on my backend, 
with a single Gentoo image I share between all my 64-bit MythTV 
systems.  About once a week, I boot into that base image and update 
world.  I shut the machines all down, clone the base image, one for each 
machine, and boot them back up.  I have a custom initrd that mounts the 
proper iSCSI share, followed by a script that runs on first boot to pull 
in assorted config files from an NFS share, and a reboot.

While this seems complicated, once set up, it makes management much 
easier.  Once rebooted, each system is fully independent, with a single 
filesystem on a writable virtual disk.  I don't have a huge nest of NFS 
overlays for each box, just one iSCSI export.  I don't have a bunch of 
init scripts that need changing to allow for a primarily read-only file 
system.  Aside from the custom initrd, and additions to the network 
shutdown script (to just not shut it down), it's a nearly stock Gentoo 
system.

I have to carry around a bunch of several GB disk images, but they are 
backed by a copy-on-write filesystem (ZFS) so the only space they take 
up is a few dozen megs of config files and logs.  The additional benefit 
is that I don't destroy old images.  I carry around three old instances 
of each install, so if an upgrade fails, it's trivial to revert to the 
old copy.  I keep the base images around much longer, and within about 
five minutes, can boot into any previous version I've run in the last year.


More information about the mythtv-users mailing list