Am 08.03.2013 13:08, schrieb sf...@users.sourceforge.net:

> I still don't know why /export/clients/usr/.wh..wh..opq could solve the
> problem. So I think it better to keep our mind that problem happened on
> NFS client in linux-3.6.
> Someday when I have enough time, I may dive into NFS in linux-3.6 and to
> see anything wrong.

Apparently you have been right, it has to be something in kernel 3.6 
which leads to the error. Everything is fine when using linux kernel 
3.8.4 and using git to checkout aufs3.8. After recompiling and 
installing the new kernel and initramfs I removed the whiteouts and 
still everything works.

To make sure it has not been a glitch of some sort I did start from 
scratch with a fresh linux source tree of 3.6, adding aufs3.6 patches 
and a aufs3.6 kernel module and voila, the error reappears.

As I have no problem whatsoever with using a current linux kernel I am 
perfectly happy now. I must admit, that I would love to know why 3.6 
gets me the error, but I would much rather concentrate on the present 
than spend time on days gone by.

In response to Hans-Peter Jansen I would like to thank you for your 
comment. You might very well be right in your suspicion regarding 
exporting the root readonly and subdirectories read/write, but I did not 
explore this further. My setup intends to make daily upgrades very easy 
with as little duplication as possible, for this reason the clients 
share the basic installation with the server. There are some 
shortcomings, server and client need to share the architecture for 
instance, but for my small networks it has proven to be at least usable. 
Just like you I use xino on a tmpfs, it had just been a test with the 
noxino option. Regarding the udba settings I think udba=reval is 
currently already the default for aufs, I will definitely have a look 
there to see, if there are other problems waiting for me.

Eibo Thieme

My current, working init script for the initramfs:

#!/bin/busybox sh

echo "Loading, please wait..."

# /bin/mount, otherwise busybox builtin would get used
echo -n "Mounting /sys and /proc..."
/bin/mount -t sysfs -o nodev,noexec,nosuid none /sys
/bin/mount -t proc -o nodev,noexec,nosuid none /proc
echo "Done."

# Export relevant variables
export TARGET=/root

# debugging
#klogd -c 4
#syslogd -R 192.168.0.1
#modprobe aufs debug=1
#modprobe aufs

echo -n "Loading essential drivers..."
if [ -e /etc/modules ]; then
         cat /etc/modules | while read m; do
                 # Skip empty lines
                 if [ -z "$m" ];  then
                         continue
                 fi
                 # Skip comments - dash removes whitespace prefix
                 com=$(printf "%.1s" "${m}")
                 if [ "$com" = "#" ]; then
                         continue
                 fi
                 modprobe $m
         done
fi
echo "Done."

# pxelinux sets BOOTIF to 01-??-??-??-??-??-?? (MAC)
bootif_mac=""
IFS='-'
for x in ${BOOTIF} ; do
         bootif_mac="$bootif_mac:$x"
done
unset IFS
bootif_mac=${bootif_mac#:*:}
done
unset IFS
bootif_mac=${bootif_mac#:*:}

# find DEVICE to bootif_mac
for device in /sys/class/net/* ; do
         if [ -f "$device/address" ]; then
                 current_mac=$(cat "$device/address")
                 if [ "$bootif_mac" = "$current_mac" ]; then
                         DEVICE=${device##*/}
                         break
                 fi
         fi
done

echo "Starting network..."

# Loopback
ifconfig lo up

# Ethernet
ifconfig ${DEVICE} up

# DHCP
udhcpc -i ${DEVICE} -q -s /sbin/setup-net

# source output of script /sbin/setup-net (HOSTNAME, SERVER)
. /tmp/net.conf

echo "Network Done."

echo -n "Mounting root file system..."

NFSOPTS="nfsvers=3,nolock"

# mount the xino dir
/bin/mount -t tmpfs -o size=16M none /aufs/xino

# mount the clients specific dir
/bin/mount -t nfs -o rw,${NFSOPTS} ${SERVER}:/target/export /${HOSTNAME} 
  /aufs/private

# mount the clients general dir
/bin/mount -t nfs -o ro,${NFSOPTS} ${SERVER}:/target/export/clients 
/aufs/clients

# mount the server root dir
/bin/mount -t nfs -o ro,${NFSOPTS} ${SERVER}:/target/ /aufs/server

# do the union
/bin/mount -t aufs -o 
xino=/aufs/xino/root,dirs=/aufs/private=rw:/aufs/clients=rr+wh:/aufs/server=rr 
none ${TARGET}

echo "Done."

/bin/mount --move /aufs/xino ${TARGET}/aufs/xino
/bin/mount --move /aufs/private ${TARGET}/aufs/private
/bin/mount --move /aufs/clients ${TARGET}/aufs/clients
/bin/mount --move /aufs/server ${TARGET}/server

# Move virtual filesystems over to the real filesystem
/bin/mount --move /sys ${TARGET}/sys
/bin/mount --move /proc ${TARGET}/proc

# Chain to real filesystem
exec /bin/run-init ${TARGET} /sbin/init "$@" <${TARGET}/dev/console 
 >${TARGET}/dev/console

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html

Reply via email to