You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WriteFileHandle: ReadAt: Can't read and write to file without cache (rclone mount+gocryptfs) #1853
What is your rclone version (eg output from rclone -V)
rclone v1.38-DEV
os/arch: linux/amd64
go version: go1.9.1
built from git.
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Fedora 27 x64
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone mount -vv --allow-other --default-permissions --write-back-cache gd: /Drive/.remote &
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
I have an existing gocryptfs encrypted directory tree on gdrive and current scheme is gocrypt->google-drive-ocamlfuse. I am trying to replace google-drive-ocamlfuse with rclone mount and this is the error I get when I try to copy files to the mount.
I am attaching the -vv log log.txt
The problem is that without cache, rclone can't open files read and write - that is just the way cloud storage systems work
So the Open: flags=O_RDWR|O_CREATE|O_EXCL means that the file was opened for Read/Write. Without cache rclone will open the file for write in this case and give an error if it was read from.
To fix use --cache-mode minimal or any of the higher cache modes.
This cache code is relatively new so take care while testing. I'm very interested to hear how you get on.
I think I will go with --cache-mode writes and test in a minute.
What is the default value of --low-level-retries ?
I am assuming that --cache-max-age also clears any leftovers in cache from failed uploads, correct?
It works great so far. In fact the whole process of uploading is 1000% faster than google-drive-ocamlfuse. And non-blocking due to to proper cache implementation. I copied a few files back and forth and checked sha1 hashes. Seems to be working amazingly well!
I will keep running with -vv for a while while copying files so I can monitor for any issues. Then I will try and put a heavy load on it and test some more before I switch permanently.
Still I woulld like to know the default value of --low-level-retries and if -1 is a possible value for infinite retry before I close this:)
It works great so far. In fact the whole process of uploading is 1000% faster than google-drive-ocamlfuse. And non-blocking due to to proper cache implementation. I copied a few files back and forth and checked sha1 hashes. Seems to be working amazingly well!
Great! One thing to watch out for - it is a writeback cache so you need to make sure everything is uploaded before stopping the mount. There isn't a good way of doing that at the moment which I will fix soon.
I found the default value for --low-level retries, it is listed in --help heh. It doesn't say if it akes -1 though so I'm assuming no.
If you want to turn it off then set it to 1 confusingly. It is the total number of tries. I recommend not though as cloud storage systems can be unreliable at the best of times!
tried a rclone cachestats gd: to check if I it would show status of cache and got:
confusingly, and temporarily most likely, rclone has two caching systems, one for mount and a cache backend. That command is for the cache backend - I've put this in a new issue #1855
Great! One thing to watch out for - it is a writeback cache so you need to make sure everything is uploaded before stopping the mount. There isn't a good way of doing that at the moment which I will fix soon.
This is exactly why I tried the cachestats command. Trying to see if some kind of cache status is implemented as currently I see now way to see if the upload is finished except perhaps watching -vv output?
If you want to turn it off then set it to 1 confusingly. It is the total number of tries. I recommend not though as cloud storage systems can be unreliable at the best of times!
I want to do the exact opposite, this is why I asked if it takes -1. I want it to keep trying ad infinitum. :) What is the max value?
I'll just note that if you use -v --stats 1m then you will see stats printed every minute which will include files being transferred. Not a perfect solution, but better than nothing!
I will start using this for monitoring. Although ideally a parameter that outputs if there's any transfer going on/files queued in cache that could be parsed in a script to check before unmounting or rebooting the server would be ideal!
Activity
ncw commentedon Nov 23, 2017
The problem is that without cache, rclone can't open files read and write - that is just the way cloud storage systems work
So the
Open: flags=O_RDWR|O_CREATE|O_EXCLmeans that the file was opened for Read/Write. Without cache rclone will open the file for write in this case and give an error if it was read from.To fix use
--cache-mode minimalor any of the higher cache modes.This cache code is relatively new so take care while testing. I'm very interested to hear how you get on.
riopardo commentedon Nov 23, 2017
Nodens- commentedon Nov 23, 2017
I think I will go with --cache-mode writes and test in a minute.
What is the default value of --low-level-retries ?
I am assuming that --cache-max-age also clears any leftovers in cache from failed uploads, correct?
Nodens- commentedon Nov 23, 2017
It works great so far. In fact the whole process of uploading is 1000% faster than google-drive-ocamlfuse. And non-blocking due to to proper cache implementation. I copied a few files back and forth and checked sha1 hashes. Seems to be working amazingly well!
I will keep running with -vv for a while while copying files so I can monitor for any issues. Then I will try and put a heavy load on it and test some more before I switch permanently.
Still I woulld like to know the default value of --low-level-retries and if -1 is a possible value for infinite retry before I close this:)
Nodens- commentedon Nov 23, 2017
I found the default value for --low-level retries, it is listed in --help heh. It doesn't say if it akes -1 though so I'm assuming no.
I tried a rclone cachestats gd: to check if I it would show status of cache and got:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x81a08e]
goroutine 1 [running]:
github.com/ncw/rclone/cmd/cachestats.glob..func1.1(0xc420351260, 0x3)
/home/user/go/src/github.com/ncw/rclone/cmd/cachestats/cachestats.go:45 +0x1be
github.com/ncw/rclone/cmd.Run(0xc420180101, 0x15d9740, 0xc420125d08)
/home/user/go/src/github.com/ncw/rclone/cmd/cmd.go:265 +0xa7
github.com/ncw/rclone/cmd/cachestats.glob..func1(0x15d9740, 0xc420181ab0, 0x1, 0x1)
/home/user/go/src/github.com/ncw/rclone/cmd/cachestats/cachestats.go:41 +0x1aa
github.com/ncw/rclone/vendor/github.com/spf13/cobra.(*Command).execute(0x15d9740, 0xc420181a60, 0x1, 0x1, 0x15d9740, 0xc420181a60)
/home/user/go/src/github.com/ncw/rclone/vendor/github.com/spf13/cobra/command.go:654 +0x2a2
github.com/ncw/rclone/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x15d92c0, 0xc420257f70, 0x4060b4, 0xc42007a058)
/home/user/go/src/github.com/ncw/rclone/vendor/github.com/spf13/cobra/command.go:729 +0x2fe
github.com/ncw/rclone/vendor/github.com/spf13/cobra.(*Command).Execute(0x15d92c0, 0xc4202d6140, 0x20)
/home/user/go/src/github.com/ncw/rclone/vendor/github.com/spf13/cobra/command.go:688 +0x2b
main.main()
/home/user/go/src/github.com/ncw/rclone/rclone.go:15 +0x31
ncw commentedon Nov 23, 2017
Great! One thing to watch out for - it is a writeback cache so you need to make sure everything is uploaded before stopping the mount. There isn't a good way of doing that at the moment which I will fix soon.
If you want to turn it off then set it to 1 confusingly. It is the total number of tries. I recommend not though as cloud storage systems can be unreliable at the best of times!
confusingly, and temporarily most likely, rclone has two caching systems, one for mount and a cache backend. That command is for the cache backend - I've put this in a new issue #1855
Nodens- commentedon Nov 23, 2017
This is exactly why I tried the cachestats command. Trying to see if some kind of cache status is implemented as currently I see now way to see if the upload is finished except perhaps watching -vv output?
I want to do the exact opposite, this is why I asked if it takes -1. I want it to keep trying ad infinitum. :) What is the max value?
Nodens- commentedon Nov 25, 2017
Closing this. Although should probably make a new issue requesting a cache/progress status display enhancement for mount.
ncw commentedon Nov 29, 2017
I'll just note that if you use
-v --stats 1mthen you will see stats printed every minute which will include files being transferred. Not a perfect solution, but better than nothing!Nodens- commentedon Nov 29, 2017
I will start using this for monitoring. Although ideally a parameter that outputs if there's any transfer going on/files queued in cache that could be parsed in a script to check before unmounting or rebooting the server would be ideal!
ncw commentedon Dec 12, 2017
@Nodens- I've put your suggestion in #1909 - thanks