Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory rename hides files #91

Open
ypsu opened this issue Dec 22, 2019 · 2 comments
Open

Directory rename hides files #91

ypsu opened this issue Dec 22, 2019 · 2 comments

Comments

@ypsu
Copy link

ypsu commented Dec 22, 2019

Here's a repro:

$ mkdir -p ro rw union ro/dir
$ unionfs -o cow rw=RW:ro=RO union
$ touch ro/dir/{f1,f2,f3}
$ cd union
$ ls dir
f1
f2
f3
$ echo hello >dir/f2
$ mv dir otherdir
$ ls otherdir
f2
$ cd ..
$ fusermount -u union

The second ls doesn't show f1 and f3, only f2 that I have modified. The most annoying thing is that this happens completely silently, one has to be lucky to notice such file disappearance. Not sure I understand how complicated the problem is, but I'd be happy if such a rename would just error out rather than work erroneously. :(

I've checked previous issues (#23, #25, #27) but I couldn't really tell if it's the same problem or not so I thought I create a separate issue for this.

@bsbernd
Copy link
Contributor

bsbernd commented Dec 22, 2019

Ok hmm, so dir/f2 have been copied to the rw layer and the rename only touches that layer. The correct behavior probably would be to copy over the remaining files on rename. Bailing out might be an option, but I don't know if this wouldn't break things like systemd.

@bsbernd
Copy link
Contributor

bsbernd commented Dec 23, 2019

Thanks for the pointers, I think #25 is related. I need to go through all the git issues, I'm just as time limited as usual. I will try to fix this issue here during the next days.

Thanks,
Bernd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants