[Unionfs] Re: Stacking semantics with multiple rw branches changed ?
pascal at pabr.org
pascal at pabr.org
Tue Nov 20 05:22:16 EST 2007
Erez Zadok wrote:
> If you could try this w/ 2.6.23.8 and unionfs-2.1.9, that'd be great.
I just upgraded to 2.6.23.8 with unionfs-2.1.9_for_2.6.23.1.
The problem is still present.
> My setup was that /b0 and /b1 were both ext3 partitions. What's yours?
/b0, /b1 and /union are directories on the same ext3 partition (/).
Nothing is mounted on /b0 and /b1.
There are no kernel patches apart from unionfs.
The / partition is unusual (initrd chroots into a raid1 md device),
but since I can reproduce the problem entirely in /tmp (tmpfs) as well,
I assume this is not relevant.
Here is the test script I am running now (as root):
#/bin/sh
D=/tmp
mkdir $D/b0 $D/b1 $D/b1/foo $D/union
mount -t unionfs -o dirs=$D/b0:$D/b1 none $D/union
cat /proc/mounts
mkdir $D/union/foo/bar1
touch $D/union/foo/z
mkdir $D/union/foo/bar2
find $D/b0 -ls
find $D/b1 -ls
umount $D/union
#rm -r $D/b0 $D/b1 $D/union
and the result:
rootfs / rootfs rw 0 0
proc /proc proc rw 0 0
sys /sys sysfs rw 0 0
/dev /dev tmpfs rw 0 0
/dev/pts /dev/pts devpts rw 0 0
/dev/md2 / ext3 rw,noatime,data=ordered 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
/dev/md1 /boot ext3 rw,noatime,data=ordered 0 0
tmpfs /dev/shm tmpfs rw 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noexec,noatime 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/etc/auto.misc /misc autofs rw,fd=6,pgrp=1844,timeout=300,minproto=5,maxproto=5,indirect 0 0
none /tmp/union unionfs rw,dirs=/tmp/b0=rw:/tmp/b1=rw 0 0
4541 0 drwxr-xr-x 3 root root 60 Nov 20 10:38 /tmp/b0
4554 0 drwxr-xr-x 3 root root 80 Nov 20 10:38 /tmp/b0/foo
4561 0 drwxr-xr-x 2 root root 60 Nov 20 10:38 /tmp/b0/foo/bar2
4562 0 -r--r--r-- 1 root root 0 Nov 20 10:38 /tmp/b0/foo/bar2/.wh.__dir_opaque
4555 0 -rw-r--r-- 1 root root 0 Nov 20 10:38 /tmp/b0/foo/z
4542 0 drwxr-xr-x 3 root root 60 Nov 20 10:38 /tmp/b1
4543 0 drwxr-xr-x 3 root root 60 Nov 20 10:38 /tmp/b1/foo
4552 0 drwxr-xr-x 2 root root 60 Nov 20 10:38 /tmp/b1/foo/bar1
4553 0 -r--r--r-- 1 root root 0 Nov 20 10:38 /tmp/b1/foo/bar1/.wh.__dir_opaque
I expected unionfs to create z and bar2 in /tmp/b1/foo/.
> # find /n/lower/b0
> /n/lower/b0
> /n/lower/b0/foo
> /n/lower/b0/foo/bar1
> /n/lower/b0/foo/bar1/.wh.__dir_opaque
> /n/lower/b0/foo/bar2
> /n/lower/b0/foo/bar2/.wh.__dir_opaque
> /n/lower/b0/lost+found
> /n/lower/b0/z
> # find /n/lower/b1
> /n/lower/b1
> /n/lower/b1/lost+found
> /n/lower/b1/foo
It looks like you created "z" in union/ instead of union/foo/.
However, your test raises the same question as mine:
If the policy is "we try to make the file in the leftmost
branch in which the parent exists", then why does unionfs
create bar1 and bar2 in b0 although the parent /n/lower/b0/foo/
does not exist initially ?
Thanks,
Pascal
More information about the unionfs
mailing list