juicedata / juicefs

JuiceFS is a distributed POSIX file system built on top of Redis and S3.
https://juicefs.com
Apache License 2.0
10.06k stars 888 forks source link

There are some problems with sync when there is a symlink under the directory #4914

Closed YunhuiChen closed 3 weeks ago

YunhuiChen commented 3 weeks ago

mount juicefs : ./juicefs mount redis://127.0.0.1:6379/1 /juicefs1 --cache-dir /data/cache -d test: 1、root@chaos-k8s-001:~/chenyunhui/juicefs# ln -s /root/chenyunhui/juicefs ttt 2、./juicefs sync /root/chenyunhui/juicefs/ /juicefs1/test/ 2024/06/03 10:40:34.804765 juicefs[3088514] : Prometheus metrics listening on 127.0.0.1:41741 [mount.go:135] 2024/06/03 10:40:34.806117 juicefs[3088514] : Syncing from file:///root/chenyunhui/juicefs/ to file:///juicefs1/test/ [sync.go:1315] 2024/06/03 10:40:40.028837 juicefs[3088514] : Failed to copy data of ttt/.git/hooks/post-update.sample in 5.002429846s: open /juicefs1/test/ttt/.git/hooks/.post-update.sample.tmp6403215657993245571: not a directory [sync.go:611] 2024/06/03 10:40:40.028900 juicefs[3088514] : Failed to copy data of ttt/.autocorrectrc in 5.002707143s: open /juicefs1/test/ttt/..autocorrectrc.tmp39363165739402485: not a directory [sync.go:611] 2024/06/03 10:40:40.028941 juicefs[3088514] : Failed to copy data of ttt/.git/ORIG_HEAD in 5.00269793s: open /juicefs1/test/ttt/.git/.ORIG_HEAD.tmp6714534521716387326: not a directory [sync.go:611] 2024/06/03 10:40:40.028907 juicefs[3088514] : Failed to copy object ttt/.git/hooks/post-update.sample: open /juicefs1/test/ttt/.git/hooks/.post-update.sample.tmp6403215657993245571: not a directory [sync.go:699] 2024/06/03 10:40:40.028963 juicefs[3088514] : Failed to copy object ttt/.git/ORIG_HEAD: open /juicefs1/test/ttt/.git/.ORIG_HEAD.tmp6714534521716387326: not a directory [sync.go:699] 2024/06/03 10:40:40.028939 juicefs[3088514] : Failed to copy object ttt/.autocorrectrc: open /juicefs1/test/ttt/..autocorrectrc.tmp39363165739402485: not a directory [sync.go:699] 2024/06/03 10:40:40.028883 juicefs[3088514] : Failed to copy data of ttt/.git/description in 5.00260194s: open /juicefs1/test/ttt/.git/.description.tmp6193331226786016011: not a directory [sync.go:611]

davies commented 3 weeks ago

Because part of /juicefs1/test/ttt/.git/.description.tmp6193331226786016011 is a file, not a directory.