Hello everyone,
First, I want to mention that I really enjoy using Rclone and thank you for the great work on this project.
Unfortunately, I have recently encountered an issue. I have tried to fill out this report as carefully and comprehensively as possible. Please let me know if it is incomplete or if you need any additional logs or details; I would be happy to provide them.
Thanks in advance for your help!
What is the problem you are having with rclone?
After deleting a directory through an rclone mount, the directory sometimes stays visible in the mount while it is really gone on the remote. Any access inside it then fails with pcloud error: Directory does not exist. (2005).
The rmdir itself succeeds and the directory is genuinely removed on pCloud. What remains is an entry in the mount's view of the parent directory.
Comparing the mount against a direct listing of the same remote, while the problem was showing:
$ find /data/crypt/movies -maxdepth 1 -mindepth 1 -type d | wc -l
112
$ rclone lsf --dirs-only crypt:movies | wc -l
111
# the extra entry, present in the mount and absent on pCloud:
The Age of Adaline (2015) {tmdb-293863}
The stale entry stats fine but cannot be listed:
$ ls -ld "/data/crypt/movies/The Age of Adaline (2015) {tmdb-293863}"
drwxr-xr-x. 1 root root 0 Aug 16 15:39 ...
$ ls -la "/data/crypt/movies/The Age of Adaline (2015) {tmdb-293863}"
ls: reading directory '...': Input/output error
What I tried
- Sending
SIGHUPto the rclone process (dir-cache flush) does not remove the entry. I compared before and after: the directory was still listed and the counts were unchanged, 112 against 111. - Restarting the process does remove it.
- An
rmdirof the stale entry through the mount also removes it, although it returns an I/O error while doing so.
Impact in my setup
An application that checks whether a folder exists before writing into it sees the stale entry, skips creating the folder, and every write into it then fails with 2005 until the mount is restarted.
Steps to reproduce
This is intermittent. Running the exact same commands three times, it reproduced once out of three.
# 1. create the directory with a separate rclone process, not through the mount
rclone mkdir crypt:movies/zbug
# 2. make the mount list the parent, so the entry enters its view
ls /data/crypt/movies > /dev/null
# 3. remove it through the mount (no error reported)
rmdir /data/crypt/movies/zbug
# 4. compare the two views
ls -d /data/crypt/movies/zbug # still there
rclone lsf --dirs-only crypt:movies | grep zbug # gone
Output of the failing run:
rmdir done
/data/crypt/movies/zbug
absent on pCloud
The two passing runs, same commands: the directory was gone from both views.
I could not find a timing pattern separating the failing run from the passing ones. In one passing run the Lookup happened in the same second as the Remove, just like in the failing case.
One difference I can see in the logs, and I have no explanation for it: in the failing case the line movies: invalidating directory cache, naming the parent directory, does not appear. It does appear in both passing runs. Both log extracts are below.
I searched before posting. Issue #9554 looks like the same symptom on a different backend: a file deleted through rclone serve webdav stayed listed by the VFS while being gone on the cloud, vfs/forget did not clear it, and only a restart did. It was closed after a fix in the MEGA backend, so I am not sure it covers what I am seeing on pCloud.
I am on the latest stable, 1.75.0. I have not tried the 1.76.0 beta yet, happy to if that helps.
Run the command 'rclone version' and share the full output of the command
rclone v1.75.0
- os/version: alpine 3.24.1 (64 bit)
- os/kernel: 6.12.102-flatcar (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.26.5
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
pCloud, EU endpoint (eapi.pcloud.com), behind a crypt remote. rclone runs in an Alpine container on Flatcar Container Linux.
The command you were trying to run (eg rclone copy /tmp remote:tmp)
Container entrypoint:
/bin/sh -c 'fusermount3 -uz /data/crypt 2>/dev/null || fusermount -uz /data/crypt 2>/dev/null || umount -l /data/crypt 2>/dev/null || true; exec rclone "$@"' --
Command:
rclone mount crypt: /data/crypt \
--allow-other \
--allow-non-empty \
--vfs-cache-mode off \
--buffer-size 1G \
--dir-cache-time 72h \
--tpslimit 8 \
--tpslimit-burst 8 \
--low-level-retries 100 \
-vv
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[crypt]
type = crypt
remote = pcloud:server
password = XXX
password2 = XXX
[pcloud]
type = pcloud
hostname = eapi.pcloud.com
token = XXX
### Double check the config for sensitive info before posting publicly
A log from the command that you were trying to run with the -vv flag
15:39:25 DEBUG : movies/: Remove: name="The Age of Adaline (2015) {tmdb-293863}"
15:39:25 DEBUG : changeNotify: relativePath="movies/The Age of Adaline (2015) {tmdb-293863}", type=0
15:39:25 DEBUG : movies/The Age of Adaline (2015) {tmdb-293863}: invalidating directory cache
15:39:25 DEBUG : movies: Added virtual directory entry vDel: "The Age of Adaline (2015) {tmdb-293863}"
15:39:25 DEBUG : movies/: >Remove: err=<nil>
15:39:25 DEBUG : movies/: Lookup: name="The Age of Adaline (2015) {tmdb-293863}"
15:39:25 DEBUG : movies: Removed virtual directory entry vDel: "The Age of Adaline (2015) {tmdb-293863}"
15:39:25 DEBUG : movies/: >Lookup: node=movies/The Age of Adaline (2015) {tmdb-293863}/, err=<nil>
15:39:25 DEBUG : movies/The Age of Adaline (2015) {tmdb-293863}/: ReadDirAll:
15:39:25 DEBUG : movies/The Age of Adaline (2015) {tmdb-293863}: Dir.ReadDirAll error: couldn't list files: pcloud error: Directory does not exist. (2005)
15:39:25 ERROR : movies/The Age of Adaline (2015) {tmdb-293863}/: Dir.Stat error: couldn't list files: pcloud error: Directory does not exist. (2005)
For comparison, the same operation on a directory that did not become stale:
16:43:47 DEBUG : movies/: Remove: name="zbug3"
16:43:47 DEBUG : pcloud root 'server': ChangeNotify: detected change in "..." (type: 0)
16:43:47 DEBUG : changeNotify: relativePath="movies/zbug3", type=0
16:43:47 DEBUG : movies: invalidating directory cache
16:43:47 DEBUG : movies/zbug3: invalidating directory cache
16:43:47 DEBUG : >changeNotify:
16:43:47 DEBUG : movies: Added virtual directory entry vDel: "zbug3"
16:43:47 DEBUG : movies/: Lookup: name="zbug3"
16:43:47 DEBUG : movies: Removed virtual directory entry vDel: "zbug3"