[arch-general] Stateless Arch
Paul Gideon Dann
pdgiddie at gmail.com
Mon Jul 9 05:08:51 EDT 2012
On Monday 09 Jul 2012 10:10:07 Damjan wrote:
> Has anyone done any research on stateless ArchLinux instances.
>
> A stateless Arch would be one where the root filesystem is mounted
> read-only and nothing changes there. Thus it can mounted over network
> (using NFS, NBD and similar) by several, diskless, PCs at the same time.
>
> I plan to have per user HOME directories on a server (again NFS or
> similar), and users credentials in LDAP.
>
> /var/run beeing a link to a tmpfs /run, and by using systemd-journal
> without /var/log/journal (it will store logs in memory) a lot of things
> avoid hitting the disk already.
>
> I'd use connman for handling the net connection and it seems to require
> a writable /var/lib/connman/
>
>
> Anyone with any experience with this?
I run an ArchLinux processing cluster for work. The nodes are diskless, so I
can certainly offer some advice for getting this setup to work.
Most important tip: don't try to use NFSv4. You can't boot Arch over NFSv4
yet.
My setup has the nodes mounting root rw, but in practice they never touch it
except for when I run an upgrade or do some manual configuration, which I
usually do from a node (because it's easier).
Each node has a separate /var directory stored on the server. I added a
script that uses the initscripts hooks to mount the correct /var for each node
based on its hostname (which is assigned via DHCP). If you don't care about
retaining state, you could probably mount /var as a tmpfs and copy a template
into it, which would avoid needing to create a directory on the server for
each node.
I'd be happy to provide further details if you'd like some pointers, but I got
most of the important information from the Wiki, so pretty much all you need
is there.
Paul
More information about the arch-general
mailing list