Date: Wed, 4 Dec 2002 00:48:51 -0400 (AST) From: "Marc G. Fournier" <scrappy@hub.org> To: freebsd-questions@freebsd.org Subject: using mount_union Message-ID: <20021204004113.P36076-100000@hub.org>
next in thread | raw e-mail | index | archive | help
Evening all ... I just read through the man page a couple of times, and it sounded quite straightforward, but I've obviously mis-understood ... My read of the man page is that I can create to directories (/d1 and /d2), mount /d1 over /d2 (mount_union /d2 /d1) and if I create a file in /d2, it won't show up in /d1, but if I create on in /d1, it will show up in /d2 ... But, when I tried it "in reality", it didn't matter which one I created in, it showed up in the other one ... venus# mkdir d1 d2 venus# mount_union /v1/test/d2 /v1/test/d1 venus# touch /v1/test/d1/testfile venus# touch /v1/test/d2/testfile2 venus# ls -lR total 4 drwxr-xr-x 4 root wheel 512 Dec 3 22:45 d1 drwxr-xr-x 2 root wheel 512 Dec 3 22:45 d2 ./d1: total 0 -rw-r--r-- 1 root wheel 0 Dec 3 22:45 testfile -rw-r--r-- 1 root wheel 0 Dec 3 22:45 testfile2 ./d2: total 0 -rw-r--r-- 1 root wheel 0 Dec 3 22:45 testfile -rw-r--r-- 1 root wheel 0 Dec 3 22:45 testfile2 And when I umount the file system, d1 loses the files that were created on it: venus# umount /v1/test/d1 venus# df -t union venus# ls -lR total 4 drwxr-xr-x 2 root wheel 512 Dec 3 22:44 d1 drwxr-xr-x 2 root wheel 512 Dec 3 22:45 d2 ./d1: ./d2: total 2 -rw-r--r-- 1 root wheel 28 Dec 3 22:46 testfile -rw-r--r-- 1 root wheel 0 Dec 3 22:45 testfile2 So have I totally botched my read of the man page, or am I just doign something wrong? :( Thanks ... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021204004113.P36076-100000>