Additions have been made to /sbin/rc and /sbin/functions.sh to accomodate the adelie linux clustering methodology. This is great! However, some things don't work. Most troublesome is the following: if grep -q -v "^${DIR}[[:space:]]" /etc/exports then mount -o nolock -n server:"${DIR}" "${DIR}" fi This is not in the scripts available from adelie, but only in the gentoo version. I think I understand what is trying to be accomplished (mount the /etc,/var, and /root directories from the NFS server) but do not understand why the following grep expression is used: grep -q -v "^${DIR}[[:space:]]" /etc/exports Which states: If ANY line is found in /etc/exports OTHER THAN (lines starting with) /etc(/var,/root), then mount... This will nearly ALWAYS return 0 (true), for several reasons: 1. The first line in the /etc/exports file is typically a comment (and there may be other comments) 2. If there are ANY exports OTHER THAN /etc (/var,/root), then an attempt will be made to mount /etc (/var,/root), which could definitely fail if /etc (/var,/root) are NOT actually exported. Even if the grep was changed to only try to mount IF the desired directory was exported, it would not account for the export of the entire server root (which adelie does do). Following the adelie methodology, the server's root is exported, and is ALREADY mounted by the kernel by the time the node is being initialised. In this case, there is no reason to try and mount the directories again, since they are already mounted. Of course, if the grep issue were resolved, there is still the issue of trying to mount directories from the machine named "server". It is highly unlikely that the NFS server actually has the name "server" (although an /etc/hosts entry on the server would "resolve" this (yuck)). I recommend that this entire if then block be removed, unless there is a good reason for it that I just do not understand (it is not annotated in CVS why this change was made). Reproducible: Always Steps to Reproduce: 1. Setup gentoo server and node via adelie method, sending "gentoo=adelie" kernel option when booting node Actual Results: boot fails Expected Results: boot succeeds Workaround: comment out the if then block in /sbin/functions.sh as follows: ... for DIR in /etc /var /root do #if grep -q -v "^${DIR}[[:space:]]" /etc/exports #then # mount -o nolock -n server:"${DIR}" "${DIR}" #fi ...
The unmount line should also be removed or commented at the end of the for loop: #umount -n "${DIR}" > /dev/null
I wrote this part of the code. This was added so it would work when /etc /var /root are in a different partition on the server. NFS doesnt cross partition mount-points, so we have to export each partition and mount them separately. Which brings us to this piece of code which mounts them(before we have access to the fstab). Btw, this whole piece of code is being moved to a regular init script, you may want to see the details in bug 4151. I agree with you that the -v is bizzare and I dont understand why it ever worked ;)
Olivier, can you guys get a patch going and tested, then I can apply ?
There are patches in bug 4151 for our new version where this part of the script is moved out of the "generic" initscript and into a custom script using those.
can this bug be closes ?
This refers to an older version of the adelie system.. With the new more flexible base-layout, we can do the initialisation in regular scripts in the "boot" runlevel! (so this problem is no longer there)
Are you guys still up to writing a guide for Adelie/nfs setup?
We have an installation guide kind of thing, but there are a few things we'd like to adjust before we make a a release...