Rclone mount not deleting all files

Hi guys,

I am having this issue for a couple of months now and just want to know your experiences.

My mount command is:

rclone_beta mount --allow-non-empty --allow-other --dir-cache-time 8760h --poll-interval 0 --vfs-cache-mode writes --vfs-cache-max-age 0m --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 2G -vv upload: /media/cry

The issue:

Sometimes when I try to delete a folder the files and folder inside the folder don’t get deleted properly so that it causes an error on WinSCP (Win10). No matter how many times I retry I have to skip that error. Interesting enough when I have a look at that folder it apperars to be empty but the moment I unmount the rclone mount and remount it there is at least one file that the folder that appeared to be empty.

I assume that’s why it doesn’t delete the parent folder because somehow there still is one “hidden” file.

This happens quite randomly so I do not have a log right now and I can’t reproduce it. However, I can run rclone with a logfile if needed.

Thanks!

You have a log file of the issue? You might be getting a rate limit error or it’s having an issue deleting one file, but without any log file, it’s all conjecture.

I do not have a log right now but now I am running rclone in debug mode so as soon as it happens again I will post a log.

I don’t think that I’m hitting any rate limit, just checked on the Google Console and couldn’t see an error for the last 30 days in it.

That sounds more like a funky character or something along those lines which will show up in a debug log :slight_smile:

1 Like

Hi guys, I was able to create a debug log, here an excerpt of the relevant part: https://1drv.ms/t/s!AoPn9ceb766mgZMtKWj6a4PapFzSpg

This is the relevant bit… Note that there is a trashed file in the directory so it can’t be deleted.

If you empty the trash then it should be able to be deleted.

2018/06/19 10:29:24 DEBUG : kk20jpvdcq51cmjdih2ov07qsg/n5oen4pbldg1kijms6vte0m5rs/v2kcv1i91pu2kpfiq97349ta962a4ftibbnfo9vk2kl7n76lke0nlfuta861b8r4695ss6ralvd6j0buif87iehuunh4v5bi055sm68/v3704tq68hq9d3ucesesdibq7o: Rmdir: contains trashed file: "ke2p2d6r2jhcr09j208ocpftesdjo9qnv7a4lu0fc96d2ooti0r9ol23vpjt1iqor0gu6mps8de76rcn37g3ouqjt7p2vjfadjuo370"
2018/06/19 10:29:24 DEBUG : kk20jpvdcq51cmjdih2ov07qsg/n5oen4pbldg1kijms6vte0m5rs/v2kcv1i91pu2kpfiq97349ta962a4ftibbnfo9vk2kl7n76lke0nlfuta861b8r4695ss6ralvd6j0buif87iehuunh4v5bi055sm68/v3704tq68hq9d3ucesesdibq7o: Rmdir: contains trashed file: "38nsgo9qhefrvm94s0vrf7sq2grsnh9i3k7elfv4q1d6936vtd91c9qj4ggo5qqabro2lha5brdfc0i6e6k6glu73tg0au3i2bpgg78"
2018/06/19 10:29:24 DEBUG : kk20jpvdcq51cmjdih2ov07qsg/n5oen4pbldg1kijms6vte0m5rs/v2kcv1i91pu2kpfiq97349ta962a4ftibbnfo9vk2kl7n76lke0nlfuta861b8r4695ss6ralvd6j0buif87iehuunh4v5bi055sm68/v3704tq68hq9d3ucesesdibq7o: Rmdir: contains trashed file: "15giktf1jntui65o32g4mftmn83a06ncfpc3auultj5m5jhufr1draoi6c4m1b58osn7crpv4dttarepa8jmdrmg8sr08igkrqd2vqukcruld38bl7c15rmh7f73g8jk"
2018/06/19 10:29:24 DEBUG : kk20jpvdcq51cmjdih2ov07qsg/n5oen4pbldg1kijms6vte0m5rs/v2kcv1i91pu2kpfiq97349ta962a4ftibbnfo9vk2kl7n76lke0nlfuta861b8r4695ss6ralvd6j0buif87iehuunh4v5bi055sm68/v3704tq68hq9d3ucesesdibq7o: Rmdir: contains trashed file: "e0h9ra1upahmlrbju2tm9u3t8bo99h5v8cahfqqshm2cdpdcocu4s0ae6pp0cege12ih3rl5i9i8ofe2o4s24amblfklm1m4dbnklv5e51qgso4o15mlkcirn1blt8r3"
2018/06/19 10:29:24 DEBUG : kk20jpvdcq51cmjdih2ov07qsg/n5oen4pbldg1kijms6vte0m5rs/v2kcv1i91pu2kpfiq97349ta962a4ftibbnfo9vk2kl7n76lke0nlfuta861b8r4695ss6ralvd6j0buif87iehuunh4v5bi055sm68/v3704tq68hq9d3ucesesdibq7o: Rmdir: contains file: "j2cv9skmcd0qkpqnn0406d43iopqeqjd9cn9tp0lf4e3r80p3ndrvrd89unn0ct8icnjncrdho4dg80cg1ij26jr122luinfhvibra8"
2018/06/19 10:29:24 ERROR : upload/series/testfolder/Subs/: Dir.Remove failed to remove directory: directory not empty

Thanks, Nick!

Did it trash all the files or only one? Is this the intended behavior of rclone?
Can I use the flag --drive-use-trash false as workaround to this issue?

rclone will trash files by default on google drive.

Yes that will delete permanently any files rather than putting them in the trash.

I am wondering then how this problem only happens randomly? From my perspective this should either happen always or never given that I don’t do anything special, I just delete folders.

I delete a couple of folder which each contain some small files and sometimes even some folder in it but only some of them end up with this error, the majority just gets deleted fine.

Seeems a bit weird to me…

Will give it a try and report back. Thanks so far! :slight_smile:

And to me too!

I don’t really understand why google needs to keep the trashed entries in their original directory…

If i try to use the flag…

–drive-use-trash false

then I get “command mount needs 2 arguments maximum”. What am I doing wrong?

What is your command line?

Using --drive-use-trash=false or --drive-use-trash false should work, eg

rclone mount --drive-use-trash=false drive: /mnt/tmp/
rclone --drive-use-trash false mount drive: /mnt/tmp/

I was using the flag the wrong way. I put “–drive-use-trash false” instead of “–drive-use-trash=false”.

Thanks for the hint, Nick! :slight_smile:

1 Like