Date: Tue, 6 Oct 1998 16:26:05 -0700 (PDT) From: asami@cs.berkeley.edu (Satoshi Asami) To: current@FreeBSD.ORG Subject: CDROM as system disk Message-ID: <199810062326.QAA07881@silvia.hip.berkeley.edu>
next in thread | raw e-mail | index | archive | help
Hi,
I'm thinking about using CDROMs as boot (system) disks on our cluster.
This is because the internal (IDE) drives shipped with the PCs seem to
have an enormous failure rate (25% in 1 1/2 years) and it's also a
pain in the backside to replace them. (We have external (SCSI) disks
too but would like to avoid using them as anything other than swap and
logs for reasons that I will not go into here.)
So, the question is: is there anyone out there using this kind of
setup?
Obviously lots of stuff (except /tmp and /var) has to be read-only,
and I could get rid of most of the boot-time warnings and errors with
the following patches (relative to -stable) to move motd and nologin
to /var/run:
===
Index: etc/login.conf
===================================================================
RCS file: /usr/cvs/src/etc/login.conf,v
retrieving revision 1.9.2.7
diff -u -r1.9.2.7 login.conf
--- login.conf 1998/03/09 03:03:23 1.9.2.7
+++ login.conf 1998/10/06 23:04:47
@@ -51,7 +51,7 @@
#
standard:\
:copyright=/etc/COPYRIGHT:\
- :welcome=/etc/motd:\
+ :welcome=/var/run/motd:\
:setenv=MAIL=/var/mail/$,BLOCKSIZE=K,EDITOR=/usr/bin/ee:\
:path=~/bin /bin /usr/bin /usr/local/bin:\
:manpath=/usr/share/man /usr/local/man:\
Index: etc/rc
===================================================================
RCS file: /usr/cvs/src/etc/rc,v
retrieving revision 1.104.2.37
diff -u -r1.104.2.37 rc
--- rc 1998/09/16 22:43:36 1.104.2.37
+++ rc 1998/10/06 23:24:02
@@ -143,8 +143,6 @@
chmod 666 /dev/tty[pqrsPQRS]*
# clean up left-over files
-rm -f /etc/nologin
-
clean_var # If it hasn't already been done
rm /var/run/clean_var
Index: etc/rc.local
===================================================================
RCS file: /usr/cvs/src/etc/rc.local,v
retrieving revision 1.21.2.2
diff -u -r1.21.2.2 rc.local
--- rc.local 1998/02/15 14:24:49 1.21.2.2
+++ rc.local 1998/10/06 23:04:37
@@ -9,13 +9,11 @@
# . /etc/rc.conf
#fi
-T=/tmp/_motd
+T=/var/run/motd
rm -f $T
uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $T
awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T
-cp $T /etc/motd
-chmod 644 /etc/motd
-rm -f $T
+chmod 644 $T
echo -n 'starting local daemons:'
Index: include/paths.h
===================================================================
RCS file: /usr/cvs/src/include/paths.h,v
retrieving revision 1.7
diff -u -r1.7 paths.h
--- paths.h 1995/09/23 15:14:25 1.7
+++ paths.h 1998/10/06 22:47:37
@@ -55,7 +55,7 @@
#define _PATH_MAILDIR "/var/mail"
#define _PATH_MAN "/usr/share/man"
#define _PATH_MEM "/dev/mem"
-#define _PATH_NOLOGIN "/etc/nologin"
+#define _PATH_NOLOGIN "/var/run/nologin"
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
#define _PATH_SHELLS "/etc/shells"
#define _PATH_TTY "/dev/tty"
===
(Incidentally, nologin seems to belong to /var/run in all senses of the
word; does anyone know why it's in /etc at all?)
The other "gotchas" I see are caused by tty perms in /dev, as /etc/rc
tries to chmod them as well as fbtab (if you're running X) and mesg
and so on. These should go away with devfs so I'm not too worried.
Pretty much everything in /var needs to be read-write, so I guess
swap, /tmp and /var should still be on a hard disk. (/tmp can be on
MFS.) But only /var needs to be preserved across reboots so this
shouldn't be to much of a problem.
One problem is how to identify the hostname. Since it is currently
set in /etc/rc.conf, and we'd like to have only one CDROM for all our
20+ machines, there should be some way to have the hosts identify
themselves. I see a bootparamd (can this be used from CDROM boots?).
Another possibility is to keep a table of "ethernet address:IP
address" pairs on the CDROM but that requires burning another CD when
the ethernet card goes bad so I'd like to avoid that. Since this
table can be kept on an NIS server, the question is how to get the
machines to talk to the server long enough to obtain the table.
An idea I came up with is:
(1) During boot, machine picks an IP address (at random) in a certain
range
(2) If there is conflict (can this be found easily?), go to (1)
(3) Use that IP address to query the NIS server to get the real IP
address
Any other ideas?
Another thing I'm thinking is to make this CDROM self-contained; that
is, you can stick this into any machine without anything in the
internal disk and it will automatically generate necessary filesystems
and mount them. This will make adding new machines to the cluster
very easy.
What do you guys think? Am I totally off the mark?
Satoshi
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810062326.QAA07881>
