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

juicefs sync error:juicefs sync --dirs -f --threads 10 /mnt/kkk/1.txt nfs://10.200.88.213:/mnt/hhh/1.txt --debug #4937

Open
xiaoyanjia-94 opened this issue Jun 12, 2024 · 3 comments
Labels
pending Solution to this issue is not decided priority/low The priority lower than normal

Comments

@xiaoyanjia-94
Copy link

When the 1.txt file already exists in the DST NFS directory,juicefs sync error happened。

  • JuiceFS version: 1.2.0-rc1+2024-06-03.f5bf1d03e88
    ----cmd/sync.go ---- The bug may occur here
    375 store, err := object.CreateStorage(name, endpoint, accessKey, secretKey, token)
    376 if name == "nfs" && err != nil {
    377 p := u.Path
    378 for err != nil && strings.Contains(err.Error(), "MNT3ERR_NOENT") {
    379 p = filepath.Dir(p)
    380 store, err = object.CreateStorage(name, u.Host+p, accessKey, secretKey, token)
    381 }
    382 if err == nil {
    383 store = object.WithPrefix(store, u.Path[len(p):])
    384 }
    385 }

When the 1.txt file already exists in the destination NFS directory, line 375 does not return an MNT3ERR_NOTDIR error as expected. Instead, it returns nil and the go-nfs-client proceeds to mount the NFS storage client normally, even in an abnormal situation. Subsequently, an error arises during the data copying process.

@xiaoyanjia-94 xiaoyanjia-94 added the kind/bug Something isn't working label Jun 12, 2024
@SandyXSD
Copy link
Contributor

It's more like a bug (or maybe by design, IDK) of NFS server, because it returns OK for mount request with a regular file as the dirpath here.

@SandyXSD SandyXSD removed the kind/bug Something isn't working label Jun 12, 2024
@xiaoyanjia-94
Copy link
Author

error log:
2024/06/07 18:01:31.704360 juicefs[94967] : maxprocs: Leaving GOMAXPROCS=32: CPU quota undefined [maxprocs.go:47]
2024/06/07 18:01:31.704652 juicefs[94967] : Debug agent listening on 127.0.0.1:6060 [main.go:321]
2024/06/07 18:01:31.704737 juicefs[94967] : Creating file storage at endpoint /mnt/kkk/1.txt [object_storage.go:167]
2024/06/07 18:01:31.704952 juicefs[94967] : Creating nfs storage at endpoint 10.200.88.213:/mnt/hhh/1.txt [object_storage.go:167]
2024/06/07 18:01:31.731339 juicefs[94967] : Prometheus metrics listening on 127.0.0.1:39805 [mount.go:135]
2024/06/07 18:01:31.731967 juicefs[94967] : Syncing from file:///mnt/kkk/1.txt to nfs://[email protected]:/mnt/hhh/1.txt [sync.go:1342]
2024/06/07 18:01:31.732039 juicefs[94967] : maxResults: 1000, defaultPartSize: 5242880, maxBlock: 10485760 [sync.go:767]
2024/06/07 18:01:31.732082 juicefs[94967] : Iterating objects from file:///mnt/kkk/1.txt with prefix start "" [sync.go:81]
2024/06/07 18:01:31.732155 juicefs[94967] : Listing objects from file:///mnt/kkk/1.txt marker "" [sync.go:110]
2024/06/07 18:01:31.746930 juicefs[94967] : Try 1 failed: NFS3ERR_NOTDIR [sync.go:190]
2024/06/07 18:01:31.748298 juicefs[94967] : Try 2 failed: NFS3ERR_NOTDIR [sync.go:190]
2024/06/07 18:01:32.763607 juicefs[94967] : Try 3 failed: NFS3ERR_NOTDIR [sync.go:190]

@SandyXSD SandyXSD added pending Solution to this issue is not decided priority/low The priority lower than normal labels Jun 12, 2024
@SandyXSD
Copy link
Contributor

We will leave this issue as it is for now, because it is not simple and is only encountered in a very specific scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending Solution to this issue is not decided priority/low The priority lower than normal
Projects
None yet
Development

No branches or pull requests

2 participants