[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Diskless boot NFS server image



Andreas Jellinghaus wrote:
>useing diskless machines or even machines with only some disk space (and other
>stuff mounted via nfs) isn't very easy. every package providing stuff for this
>should give a warning if it touches the main system.

My packages only writes to files under /var/lib/diskless. It also creates
symlinks under /tftpboot. If it EVER writes to anything else, then that
would be a serious bug ;-). Please let my know of such a situation ASAP.

>i had one try with doing everything via nfs, but not with one root for every
>machine, but one root for all machines. first i useed the 2.0 kernel transname
>patches (they allow to redirekt any operation on "file" to "file#host=<host>"
>or "file#type=<type>", but only if such a file does exist).

I never tried that, as I found it was not supported in 2.1.XX, and it is
Linux specific anyway. 

>later i moved to 2.1 kernels, where transname is no longer available, so
>i did build some script mechanism: the machines booted not init but a script
>in /etc/client/. there were special scripts, like X to "grep `hostname`
>/etc/client/<somefile>". these files had informations like "which Xserver"
>or cpp parameters to generate the XF86Config from one global one.

I have a similar system, except everything has already been configured
before the client even boots.

>but this is also a very ugly approach.
>no i ended up with a small linux installation on every machine,
>mounting /usr, /home and /opt via nfs. to update the machines,
>i can ssh to every machine as root without passwd, and use "rsync"
>to update files. 90% of the script is "--exclude" parameters.
>(available on demand).  a second script acts as daemon, useing "rwho"
>to find out which machine is up, and starting the sync scripts.
>
>but even this approach has many problems. for example, if
>the update process is interrupted, it can lead to stuff like
>installing the machine again...

Everything I have done is done at the server, hence there is no need
to use ssh. A record is kept of all files copied, and if the file
already exists and hasn't changed since the last copy, it is
not copied again. (This excludes devices, currently devices are always
considered the same if they exist).
I am not sure if this addresses your concern...

>it could be very helpfull, if all machines were real debian systems.
>no, i don't have disk space for /usr on the machines.
>my idea is this: implement some filter mechanism into dpkg,
>so one can say "--exclude=^/usr". 
>then you can still do real installations, and i hope this will
>make updates much easier.

My package only uses one global copy of /usr, by default, it is the same
(ie not a copy) as the master system (eg the NFS server). It uses a set of
rules files, and one of the rules for individual hosts, does just what
you suggested. It is:

--- =/usr

This indicates that this directory is never to be copied and no files
within that directory are to be copied. Similar startments appear
for /bin, /sbin, /lib, /mnt, /proc, /root, /home, and /cdrom (some
of these are already in the root partition /, which is also shared
for all hosts in one group). The only directories that are not shared
are /etc, /tmp, /dev, and /var.

Brian May <bam@snoopy.apana.org.au>


Reply to: