GDriveFS icon indicating copy to clipboard operation
GDriveFS copied to clipboard

Root drive slowly filling up

Open mainmeister opened this issue 10 years ago • 11 comments

When I am rsyncing my large music folder to the google drive, my root drive system slowly fills up. Is there a location where there are temp files (I've looked in /tmp but nothing there) that are not getting deleted?

image When I reboot the system it goes back to it's original size.

mainmeister avatar Jul 13 '15 16:07 mainmeister

So, I've found that the tmp folder has a folder, owned by root, named /tmp/tmpS0SSax. I've written a simple script to run under sudo to delete all the files in this folder every hour. This seems to have solved the problem.

while true
do
sleep 3600
rm /tmp/tmpS0SSax/*
done

mainmeister avatar Jul 20 '15 17:07 mainmeister

I'm reopening so that we can have it in the queue to find a better solution.

dsoprea avatar Jul 20 '15 17:07 dsoprea

The folder under /tmp changes when ever you reboot.

mainmeister avatar Jul 28 '15 16:07 mainmeister

That's why I use it. By default, tmpfs automatically has a size-limit (and should truncate old contents) and will usually reset after reboot.

I'll see if I can start a cleanup thread.

Thank you for your donation.

On Tue, Jul 28, 2015 at 12:02 PM, William R Main [email protected] wrote:

The folder under /tmp changes when ever you reboot.

— Reply to this email directly or view it on GitHub https://github.com/dsoprea/GDriveFS/issues/137#issuecomment-125663835.

dsoprea avatar Jul 28 '15 16:07 dsoprea

I am starting to wonder if it is the gdrivefs that is leaving the tempfiles behind or the rsync command that I am issuing. I've looked through all of the code and as far as I can see there is a cleanup in the del function anywhere that a temp file is used.

mainmeister avatar Jul 28 '15 18:07 mainmeister

Could it be a garbage collection problem leaving the temp files behind because the deleted objects have not yet been cleaned up?

mainmeister avatar Jul 28 '15 18:07 mainmeister

anyone have a good fix for this? im constantly using the gdrive, so i dont want to just delete files in the tmp folder for fear of corrupting current downloads.

hosler avatar Jan 18 '16 18:01 hosler

My /tmp is a tmpfs on a Raspberry Pi, so it's quite easy to bring the device to its knees without cleaning.

PythonNut avatar Apr 30 '16 21:04 PythonNut

I just created PR #156 with the fix. Since many people have created PRs of their own, I wanted to foster the continued spirit of collaboration for this project before I just went ahead and merged it. Please test.

Thanks for the feedback. I'm sorry for such delays. I didn't see this issue for what it was (a basic design flaw).

dsoprea avatar May 01 '16 22:05 dsoprea

Please test.

Seems to be working as far as I can tell! Thanks a ton!

PythonNut avatar May 02 '16 01:05 PythonNut

It's the least I could do for your continued use of this project, which I appreciate very much. Thanks to all.

dsoprea avatar May 02 '16 01:05 dsoprea