Setting up a cluster

So… I guess at this point, the hosts on could be considered a cluster. We have all of the services you would expect from a real ISP running on the network at this point. I think. I’m learning more and more as I go along.

I set up autofs for the first time this weekend. I’m pretty happy with the system, but I had a heck of a time getting it going. I was baffled at first by the format of the auto.master and config files. Here’s what the client-side configuration ended up looking like:

$ tail -1 /etc/auto.master
/etc/auto/nfs /etc/auto/auto.nfs

$ cat /etc/auto/auto.nfs
aptconf/*       nfs:/etc/apt/&
aptconf         nfs:/etc/apt

aptcache/*      nfs:/var/lib/apt/lists/&
aptcache        nfs:/var/lib/apt/lists

debmirror/*     nfs:/var/spool/debmirror/&
debmirror       nfs:/var/spool/debmirror

share/*         nfs:/usr/share/&
share           nfs:/usr/share

home/*          nfs:/home/&
home            nfs:/home

$ ls -l /home /etc/apt /var/spool/debmirror /var/lib/apt/lists /usr/share
lrwxrwxrwx 1 root root 21 Aug 19 17:19 /etc/apt -> /etc/auto/nfs/aptconf
lrwxrwxrwx 1 root root 18 Aug 19 16:36 /home -> /etc/auto/nfs/home
lrwxrwxrwx 1 root root 19 Aug 19 16:35 /usr/share -> /etc/auto/nfs/share
lrwxrwxrwx 1 root root 22 Aug 19 13:01 /var/lib/apt/lists -> /etc/auto/nfs/aptcache
lrwxrwxrwx 1 root root 23 Aug 19 13:00 /var/spool/debmirror -> /etc/auto/nfs/debmirror

One recommendation I have for those that want to try this at home: put a local stub in place for each of those in case the client boots while the nfs server is out to lunch. If you have a reasonable fallback in place, it should not matter how late in the runlevel process you put the init script for autofs. That way you could, for instance, ensure that any virtual machines that host services relied on by this client are running before anything tries to use them.

This entry was posted in colliertech, debian, etch, Free Software, Hardware, linux, Networking, Software, Unix. Bookmark the permalink.

Leave a Reply