rclone: NFS Mount Input/Output error on create files
What is the problem you are having with rclone?
Hi, I have been playing around rclone + NFS on top of it. I managed to mount, get the files listed and everything, I can delete files, read files fine, but I can’t create a new file.
Error I am getting:
$ touch test touch: cannot touch ‘test’: Input/output error
What is your rclone version (eg output from rclone -V)
Replicated in both stable release and beta release:
• ./rclone --version rclone v1.39
- os/arch: linux/amd64
- go version: go1.9.2
• rclone --version rclone v1.39-171-g1383df4fβ
- os/arch: linux/amd64
- go version: go1.10
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 64 bits
Which cloud storage system are you using? (eg Google Drive)
Google drive with a Rclone Cache on top of it
The command you were trying to run (eg rclone copy /tmp remote:tmp)
[Unit]
Description=Mount GDrive using rclone
After=network-online.target
[Service]
Type=notify
User=root
ExecStartPre=-/bin/mkdir /mnt/test
ExecStart=/home/user/rclone-tmp/rclone mount \
gdrivecache: /mnt/test \
--config /home/user/.rclone.conf \
--allow-other \
--cache-db-purge \
--cache-writes \
--cache-db-path=/tmp/rclone-test/cache-backend \
--gid=100 \
--uid=1000 \
--umask=002 \
-vv
ExecStop=/bin/fusermount -u /mnt/test
Restart=on-abort
[Install]
WantedBy=multi-user.target
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
So if I try to touch a “test” file from the mount directly I successfully get this:
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : /: Lookup: name="test"
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : /: Lookup: name="test"
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : /: Create: name="test"
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : test: Open: flags=O_RDWR|O_CREATE
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : test: >Open: fd=test (w), err=<nil>
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : /: >Create: node=test, handle=&{test (w)}, err=<nil>
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : test: Attr:
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : test: >Attr: a=valid=1m0s ino=0 size=0 mode=-rw-rw-r--, err=<nil>
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : &{test (w)}: Flush:
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : test: WriteFileHandle.Flush ignoring flush on unwritten handle
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : &{test (w)}: >Flush: err=<nil>
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : &{test (w)}: Release:
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : test: WriteFileHandle.Release closing
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 DEBUG : gdrivecache:: File to upload is small (0 bytes), uploading instead of streaming
Mar 05 17:55:12 sbx1 rclone[880]: 2018/03/05 17:55:12 INFO : gdrivecache:: put data at 'test'
Mar 05 17:55:14 sbx1 rclone[880]: 2018/03/05 17:55:14 DEBUG : : cache: expired
Mar 05 17:55:14 sbx1 rclone[880]: 2018/03/05 17:55:14 DEBUG : test: object hash cached: d41d8cd98f00b204e9800998ecf8427e
Mar 05 17:55:14 sbx1 rclone[880]: 2018/03/05 17:55:14 INFO : test: Copied (new)
Mar 05 17:55:14 sbx1 rclone[880]: 2018/03/05 17:55:14 DEBUG : &{test (w)}: >Release: err=<nil>
Mar 05 17:55:14 sbx1 rclone[880]: 2018/03/05 17:55:14 INFO : cache: deleted (0) chunks
When I do the touch from the NFS mount I get this:
Mar 05 17:54:45 sbx1 rclone[880]: 2018/03/05 17:54:45 DEBUG : /: Lookup: name="test"
Mar 05 17:54:45 sbx1 rclone[880]: 2018/03/05 17:54:45 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
Mar 05 17:54:45 sbx1 rclone[880]: 2018/03/05 17:54:45 DEBUG : /: Lookup: name="test"
Mar 05 17:54:45 sbx1 rclone[880]: 2018/03/05 17:54:45 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
And thats it.
So it does the same, look for the file, don’t find it but then don’t try to create it? Like it does on the main file system.
Let me know how I can help to test further.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 20 (10 by maintainers)
I had a look at the s3ql source code to see what its --nfs option does - it looks like it is a performance optimization only and the docs agree
I’ve investigated the problem some more and it appears that
rclone cmountdoes work. The reasonrclone mountdoesn’t work is that it doesn’t implement the FUSE Mknod callI implemented a simple Mknod and it seems to work now - can you give this a go
v1.54.0-beta.4869.bfcd4113c.fix-2115-nfs on branch fix-2115-nfs (uploaded in 15-30 mins)
Note that you’ll probably need
--vfs-cache-mode writeswith this.