Hi, I was using unionfs from 2620rc4mm1. I am slightly confused about the copyup semantics.
I have two directories dir1 and dir2 dir1/ contains a file file1 dir2/ contains a file file2 While the directories have permissions drwxr-xr-x, the files in them have the permissions -rw-r--r-- I union mount dir1 and dir2 using the command: mount -t unionfs -o dirs=dir1:dir2 none union/ When I write into file2 (which belongs to lower layer) from the union mounted directory, I have observed the following: 1. If I do 'echo xxxx > union/file2', write succeeds and there is no copyup. After unmount, I can see the file2 actually modified under dir2/ 2. If I write something to union/file2 using vi editor, the file is copied up to dir1/ and a whiteout is created in dir2/ 3. If I open(2) union/file2 and write(2) to it from an application, the write succeeds and no copyup occurs. After unmount, I can see the file2 modified(written) in dir2/ In all the 3 cases above, I am basically writing to a file in lower layer. While in cases 1 and 3, there is no copyup, there is a copyup in case2. How is this supposed to work ? I understand that in a union mount, only top level files are writable and if a lower level file is modified, it is copied up to the topmost level. Why isn't this seen consistently in the above cases ? Did I miss something ? Regards, Bharata. _______________________________________________ unionfs mailing list [email protected] http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs
