1 |
Hello. |
2 |
|
3 |
I'm working on setting up a CPU farm of diskless Gentoo based Linux |
4 |
nodes. I'm using DHCPD to supply each machine with a unique root-path, |
5 |
host-name, and fixed-address. |
6 |
|
7 |
I've done this in the past, using a shared /usr subtree and a small |
8 |
dedicated root subtree. Previously, all that was needed was a unique |
9 |
hostname and an entry in /etc/fstab referencing the root drive. |
10 |
|
11 |
I'm trying to eliminate the need for those unique entries in the root |
12 |
space. This will allow me greatly simplified support of the farm, since |
13 |
Rsync could easily be used to resync all the remote root areas from a |
14 |
common build area. Without the elimination, editing of /etc/hostname |
15 |
and /etc/fstab is required after any syncronization with the master image. |
16 |
|
17 |
/etc/hostname seemed easy. The '-H' option specified for dhcpcd in |
18 |
/etc/conf.d/net is documented to accept the passed host-name from the |
19 |
DHCP server. I presumed a 'rc-update del hostname boot' would eliminate |
20 |
that script from at least complaining, and potentially from overriding |
21 |
dhcpcd's effort to create /etc/hostname. I see that |
22 |
/etc/runlevels/boot/modules depends on hostname - fortunetly my diskless |
23 |
kernel is compiled without modules, so I've eliminated that as well. |
24 |
|
25 |
Root is a differnet issue. I can see from my logs that the diskless |
26 |
machine mounts its proper root filesystem from the server. After a |
27 |
diskless boot, a mount command shows root mounted from the right |
28 |
location, but has it mounted rsize=4096,wsize=4096,ro. The "ro" is a |
29 |
killer. |
30 |
|
31 |
The only solution I've spotted (reading /usr/src/linux/Doc*/nfsroot.txt) |
32 |
is to specify a nfsroot= parameter on the kernel command line. Testing |
33 |
with this showed initial promise, as demonstrated by changing the |
34 |
default rsize and wsize to 8192. However, the read-only status remains |
35 |
unchange, despite specifing an "rw" option on the nfsroot= line. |
36 |
|
37 |
The only thing that appears to work is to specify a proper unique entry |
38 |
in /etc/fstab. That, however, violates my design goal. |
39 |
|
40 |
Any suggestions? |
41 |
|
42 |
One note that spawned me to write this tomb to the -dev list is |
43 |
something that doesn't seem quite right to me. /etc/init.d/checkroot |
44 |
doesn't handle an nfs root file system well. Said script forces a "fsck |
45 |
-a /", which fails for an nfs mounted root filesystem. I wouldn't be |
46 |
opposed to simply "rc-update del checkroot boot" to get around that, but |
47 |
checkroot does more than just check the root file system. It also |
48 |
mounts /proc, cleans up /etc/mtab, handles devfs, etc. Seems to me that |
49 |
functionality should be split into a seperate script. |
50 |
|
51 |
Thanks for your attention. |
52 |
|
53 |
Kevin C. |
54 |
|
55 |
|
56 |
-- |
57 |
gentoo-dev@g.o mailing list |