MLH <mlh%goathill.org@localhost> wrote:
> Jan Schaumann wrote:
> > Actually, we're using rsync
> What might be the chances of letting us see/work on what you have?
Sure, why not. If you find anything odd or obviously stupid, I'll be
happy to take suggestions. :)
The basic setup is as follows:
Main file server (doppelbock):
(doppelbock) pwd
/usr/local/cluster-maint
(doppelbock) ls
NASTY_HACKS etc-c009 etc-c023
aftersync etc-c010 etc-c024
aftersync.not etc-c011 etc-c025
aftersync.old etc-c012 etc-c026
aftersync.really.old etc-c013 etc-c027
beforesync.old etc-c014 etc-c028
bin etc-c015 etc-c029
etc-c002 etc-c016 etc-c030
etc-c003 etc-c017 etc-c031
etc-c004 etc-c018 firstboot
etc-c005 etc-c019 logs
etc-c006 etc-c020 motd
etc-c007 etc-c021 rsync-excludes
etc-c008 etc-c022
(doppelbock) cat NASTY_HACKS
/etc/rc.d/mountcritlocal paxes /var-ro over mfs mounted /var
/usr/local/node needs an up-to-date MAKEDEV
Problem: nodes mfs mount /dev/, so we can't update that version
Hack: hack /sbin/init to not use /dev/MAKEDEV and /dev/MAKEDEV.local
but fetch it from /etc/ where we placed it (ie /usr/local/node/etc
on doppelbock!) In addition, /dev is created too small for our
purposes, so we increased the size.
See /usr/src/sbin/init/init.c around line 1405 and 1446
(doppelbock) ls etc-c002
inetd.conf rc.conf
(doppelbock) cat rsync-excludes
boot
kern
proc
share
var
dev
(doppelbock) ls bin
push.sh tool.sh
(doppelbock)
push.sh and tool.sh are attached -- they are used to push out an update
to all nodes. The nodes image is in /usr/local/node on the file
server, with various shared directories located on the file server and
symlinked to from the nodes base system (users home directories are set
to /share/home/<username> in /etc/passwd et al). Installing new
packages is thus as easy as on a single system: simply go into
/usr/pkgsrc/category/package on doppelbock and run 'make install'.
Done.
(doppelbock) cd /usr/local/node
(doppelbock) ls -l usr/X11R6 usr/obj usr/pkg* usr/src var-ro/db/pkg
lrwxr-xr-x 1 root wheel 12 Dec 15 2002 usr/X11R6 -> /share/X11R6
lrwxr-xr-x 1 root wheel 10 Dec 15 2002 usr/obj -> /share/obj
lrwxr-xr-x 1 root wheel 10 Dec 15 2002 usr/pkg -> /share/pkg
lrwxr-xr-x 1 root wheel 13 Dec 15 2002 usr/pkgsrc -> /share/pkgsrc
lrwxr-xr-x 1 root wheel 10 Dec 15 2002 usr/src -> /share/src
lrwxr-xr-x 1 root wheel 13 Dec 15 2002 var-ro/db/pkg -> /share/db/pkg
(doppelbock) diff -bu etc/rc.d/mountcritlocal /etc/rc.d/mountcritlocal
--- etc/rc.d/mountcritlocal 2003-08-27 18:04:57.000000000 -0400
+++ /etc/rc.d/mountcritlocal 2002-09-08 15:33:33.000000000 -0400
@@ -20,10 +20,6 @@
#
mount_critical_filesystems local
- # XXX: local change
- # /var is mfs mounted over a read-only /var-ro
- cd /var-ro; pax -rwp e . /var
-
# clean up left-over files.
# this could include the cleanup of lock files and
# /var/run, etc.
#
(doppelbock) cd /usr/src/sbin/init
(doppelbock) cvs diff -bu
cvs server: Diffing .
Index: init.c
===================================================================
RCS file: /cvsroot/src/sbin/init/init.c,v
retrieving revision 1.61
diff -b -u -r1.61 init.c
--- init.c 2003/08/07 10:04:25 1.61
+++ init.c 2003/10/22 02:08:11
@@ -1401,8 +1401,8 @@
/* Mount an mfs over /dev so we can create devices */
switch ((pid = fork())) {
case 0:
- (void)execl(INIT_MOUNT_MFS, "mount_mfs", "-i", "192",
- "-s", "768", "-b", "4096", "-f", "512", "swap", "/dev",
+ (void)execl(INIT_MOUNT_MFS, "mount_mfs", "-i", "128",
+ "-s", "10240", "-b", "4096", "-f", "512", "swap", "/dev",
NULL);
_exit(1);
/*NOTREACHED*/
@@ -1443,7 +1443,11 @@
switch ((pid = fork())) {
case 0:
if (chdir("/dev") == 0)
+#if 0
(void)execl(INIT_BSHELL, "sh", "./MAKEDEV", "init",
+#else
+ (void)execl(INIT_BSHELL, "sh", "/etc/MAKEDEV", "all",
+#endif
NULL);
_exit(1);
(doppelbock)
That's all I can think of right now. We currently don't have a decent
automatic procedure to drop in new nodes -- the last few times I had to
reinstall a node I actually took the node, opened it up, added a CD
drive, booted off an install CD, disklabel, newfs, nfs mount from
doppelbock and pax things over. Obviously, I, too, would be interested
in a decent automatic-install tool.
Hope you find this information useful. If you have ideas of how to do
things more elegantly, please let me know.
-Jan
--
Wenn ich tot bin, mir soll mal Einer mit Auferstehung oder so
kommen, ich hau ihm eine rein! (Anonym)
Attachment:
push.sh
Description: Bourne shell script
Attachment:
tool.sh
Description: Bourne shell script
Attachment:
pgpbPfjDFV9o4.pgp
Description: PGP signature