[Unionfs] unionfs 2.1 and NFS exports

Michael MacDonald mjmac at clusterfs.com
Thu Aug 9 07:49:02 EDT 2007


Hi list.

Pertinent facts:
Kernel: Linux lts-build-x86-64-0 2.6.20.3-ubuntu1 #1 SMP Wed Aug 8
18:48:49 MDT 2007 x86_64 GNU/Linux
Unionfs: [  448.574713] Registering unionfs 2.1 (for 2.6.20.14)

This is a standard Ubuntu Feisty kernel, except that the old unionfs
(1.3 vintage, I believe) has been ripped out and the 2.1 patch from
yesterday dropped in.

---------------------------------------------------------------------
Examples:

NFS server:
root at lts-build-x86-64-0:~# mount -tunionfs
-odirs=/mnt/rw/sata1/sles10-x86_64=rw:/mnt/ro/sles10-x86_64=ro
none /mnt/union/sata1/sles10-x86_64

root at lts-build-x86-64-0:~# grep union /etc/exports 
/mnt/union/sata1/sles10-x86_64
*(rw,no_root_squash,no_subtree_check,fsid=42)

NFS client:
root at lts-head:~# mount 10.8.0.124:/mnt/union/sata1/sles10-x86_64 /mnt/
mount: 10.8.0.124:/mnt/union/sata1/sles10-x86_64 failed, reason given by
server: Permission denied

NFS server:
root at lts-build-x86-64-0:~# grep mountd /var/log/daemon.log
Aug  9 05:32:12 lts-build-x86-64-0 mountd[4443]: authenticated mount
request from lts-head.co.cfs:814 for /mnt/union/sata1/sles10-x86_64
(/mnt/union/sata1/sles10-x86_64)

root at lts-build-x86-64-0:~# ls -l /mnt/union/sata1/sles10-x86_64/
total 100
drwxr-xr-x  2 root   root   4096 2007-08-08 05:39 bin
drwxr-xr-x  3 root   root   4096 2006-09-21 16:51 boot
...

root at lts-build-x86-64-0:~# touch /mnt/union/sata1/sles10-x86_64/foo
root at lts-build-x86-64-0:~# ls -l /mnt/rw/sata1/sles10-x86_64/
total 0
-rw-r--r-- 1 root root 0 2007-08-09 05:34 foo

root at lts-build-x86-64-0:~# umount /mnt/union/sata1/sles10-x86_64

NFS client:
root at lts-head:~# mount 10.8.0.124:/mnt/union/sata1/sles10-x86_64 /mnt/
root at lts-head:~# mount -tnfs
10.8.0.124:/mnt/union/sata1/sles10-x86_64 on /mnt type nfs
(rw,addr=10.8.0.124)

----------------------------------------------------------------------

GRR!

If it's not completely obvious what I'm trying to do, I'll put it
another way:  I want to create a set of per-client,per-distro,per-arch
copy-on-write unions to allow each diskless node to have its own
writable NFS root.  We have a bunch of nodes in a test cluster, and much
of the testing we do is with ancient linux distros that won't do unionfs
on the client side (at least, not without MUCH more hacking than I want
to do).  My brilliant (at the time) idea was to just handle the unionfs
gunk on the NFS server side.

What am I missing?  Thanks in advance for any help.

Mike



More information about the unionfs mailing list