What is the problem you are having with rclone?
The remote B2 storage that I've mounted with rclone mount
works great for a period of time, but then experiences a deadlock where any process interacting with that filesystem goes into an uninterruptible state. (e.g., if I try to cp
a file to it, the command doesn't succeed, and a Ctrl-C will not kill the process.).
This deadlock is absolutely affected by the --dir-cache-time
option. When running with the default, the deadlock occurs about 5 minutes after I start my sync process. If I crank it up (e.g. to 13 minutes), it will take exactly 13 minutes for the deadlock to occur.
To recover, I must Ctrl-C the actual rclone mount
command (I've tried waiting hours to no avail), which will cause any processes waiting on that filesystem to come back to life. One thing I find interesting, is that rclone mount
will still output statistics on the defined interval, however nothing else appears to function -- the writeback cache does not write back, and the (read?) cache doesn't age objects out. After killing and remounting, however, the cache cleaning operations will complete successfully.
== More (probably useless) backstory ==
The process I'm trying to ultimately accomplish, is to copy about 1.5 billion relatively small files (images) from on-premise to B2 storage. I would use rclone copy
(or sync), except we're changing the folder structure of the images from the source to the destination, and I was unable to come up with a reliable and efficient way to do this with a copy/sync.
Run the command 'rclone version' and share the full output of the command.
- os/version: centos 7.9.2009 (64 bit)
- os/kernel: 3.10.0-1160.62.1.el7.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.6
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Backblaze B2
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone mount \
--dir-cache-time 13m \
--no-modtime --no-seek \
--transfers=50 \
--vfs-cache-mode writes \
--vfs-fast-fingerprint \
--vfs-write-back 10s \
--vfs-cache-max-age 30s \
--vfs-cache-max-size 5g \
--stats-one-line -P --stats=30s \
--log-file /var/log/rclone_mount.log --log-level DEBUG \
backblaze-fbs-photos:fbs-photos /mnt/backblaze_fbs-photos
The rclone config contents with secrets removed.
[backblaze-fbs-photos]
type = b2
account = <redacted>
key = <redacted>
A log from the command with the -vv
flag
This is an abridged copy of the log file, with just the notable events being included, and other repetitive output removed.
2022/10/12 09:36:05 DEBUG : rclone: Version "v1.59.2" starting with parameters ["rclone" "mount" "--no-modtime" "--no-seek" "--transfers=50" "--vfs-cache-mode" "writes" "--vfs-fast-fingerprint" "--vfs-write-back" "10s" "--vfs-cache-max-age" "30s" "--vfs-cache-max-size" "5g" "-P" "--stats-one-line" "--stats=30s" "backblaze-fbs-photos:fbs-photos" "--log-file" "/var/log/rclone_mount.log" "--log-level" "DEBUG" "/mnt/backblaze_fbs-photos"]
2022/10/12 09:36:05 DEBUG : Creating backend with remote "backblaze-fbs-photos:fbs-photos"
2022/10/12 09:36:05 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/10/12 09:36:06 INFO : B2 bucket fbs-photos: poll-interval is not supported by this remote
2022/10/12 09:36:06 DEBUG : vfs cache: root is "/root/.cache/rclone"
2022/10/12 09:36:06 DEBUG : vfs cache: data root is "/root/.cache/rclone/vfs/backblaze-fbs-photos/fbs-photos"
2022/10/12 09:36:06 DEBUG : vfs cache: metadata root is "/root/.cache/rclone/vfsMeta/backblaze-fbs-photos/fbs-photos"
2022/10/12 09:36:06 DEBUG : Creating backend with remote "/root/.cache/rclone/vfs/backblaze-fbs-photos/fbs-photos"
2022/10/12 09:36:06 DEBUG : Creating backend with remote "/root/.cache/rclone/vfsMeta/backblaze-fbs-photos/fbs-photos"
2022/10/12 09:36:07 DEBUG : Couldn't decode error response: EOF
2022/10/12 09:36:07 DEBUG : lbr/20160610200426187490000000-o.jpg: vfs cache: truncate to size=657169
2022/10/12 09:36:07 DEBUG : lbr/20160610200426187490000000-o.jpg: vfs cache: setting modification time to 2022-10-11 15:44:26.605852561 -0500 CDT
2022/10/12 09:36:07 INFO : lbr/20160610200426187490000000-o.jpg: vfs cache: queuing for upload in 10s
2022/10/12 09:36:08 DEBUG : lbr: Added virtual directory entry vAddFile: "20160610200426187490000000-o.jpg"
2022/10/12 09:36:08 DEBUG : Couldn't decode error response: EOF
2022/10/12 09:36:08 DEBUG : lbr/20160610200426187490000000-t.jpg: vfs cache: truncate to size=13841
2022/10/12 09:36:08 DEBUG : lbr/20160610200426187490000000-t.jpg: vfs cache: setting modification time to 2022-10-11 15:44:26.628189065 -0500 CDT
2022/10/12 09:36:08 INFO : lbr/20160610200426187490000000-t.jpg: vfs cache: queuing for upload in 10s
2022/10/12 09:36:08 DEBUG : lbr: Added virtual directory entry vAddFile: "20160610200426187490000000-t.jpg"
2022/10/12 09:36:08 DEBUG : Couldn't decode error response: EOF
2022/10/12 09:36:08 DEBUG : lbr/20160610200426187490000000.jpg: vfs cache: truncate to size=29994
2022/10/12 09:36:08 DEBUG : lbr/20160610200426187490000000.jpg: vfs cache: setting modification time to 2022-10-11 15:44:26.552869127 -0500 CDT
2022/10/12 09:36:08 INFO : lbr/20160610200426187490000000.jpg: vfs cache: queuing for upload in 10s
2022/10/12 09:36:08 DEBUG : lbr: Added virtual directory entry vAddFile: "20160610200426187490000000.jpg"
2022/10/12 09:36:08 DEBUG : Couldn't decode error response: EOF
[... lots of debugging ...]
2022/10/12 09:36:29 DEBUG : rva/20220324195016759334000000-o.jpg: sha1 = 7f94597de2a1a73d760a9fb9eafe17f42c5d997d OK
2022/10/12 09:36:29 INFO : rva/20220324195016759334000000-o.jpg: Copied (new)
2022/10/12 09:36:29 DEBUG : rva/20220324195016759334000000-o.jpg: vfs cache: fingerprint now "2512935,2022-10-11 20:44:30.157 +0000 UTC,7f94597de2a1a73d760a9fb9eafe17f42c5d997d"
2022/10/12 09:36:29 INFO : rva/20220324195016759334000000-o.jpg: vfs cache: upload succeeded try #1
2022/10/12 09:36:29 DEBUG : rva/20221004175321567200000000.jpg: sha1 = 4249d7fe7b0d183a0824f30db983ef5a0c0f2aa7 OK
2022/10/12 09:36:29 INFO : rva/20221004175321567200000000.jpg: Copied (new)
2022/10/12 09:36:29 DEBUG : rva/20221004175321567200000000.jpg: vfs cache: fingerprint now "15202,2022-10-11 20:44:31.242 +0000 UTC,4249d7fe7b0d183a0824f30db983ef5a0c0f2aa7"
2022/10/12 09:36:29 INFO : rva/20221004175321567200000000.jpg: vfs cache: upload succeeded try #1
2022/10/12 09:36:30 DEBUG : rva/20171106185743246969000000-t.jpg: sha1 = 87e2b152c801ff9d985929335b7e7b5381684fdb OK
2022/10/12 09:36:30 INFO : rva/20171106185743246969000000-t.jpg: Copied (new)
2022/10/12 09:36:30 DEBUG : rva/20171106185743246969000000-t.jpg: vfs cache: fingerprint now "28457,2022-10-11 20:44:27.125 +0000 UTC,87e2b152c801ff9d985929335b7e7b5381684fdb"
2022/10/12 09:36:30 INFO : rva/20171106185743246969000000-t.jpg: vfs cache: upload succeeded try #1
2022/10/12 09:36:35 INFO : 24.235 MiB / 24.235 MiB, 100%, 1.331 MiB/s, ETA 0s
[... lots of debugging ...]
2022/10/12 09:36:50 DEBUG : /: Attr:
2022/10/12 09:36:50 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2022/10/12 09:36:51 DEBUG : /: ReadDirAll:
2022/10/12 09:36:51 DEBUG : /: >ReadDirAll: item=5, err=<nil>
2022/10/12 09:36:51 DEBUG : /: Lookup: name="fcb"
2022/10/12 09:36:51 DEBUG : /: >Lookup: node=fcb/, err=<nil>
2022/10/12 09:36:51 DEBUG : fcb/: Attr:
2022/10/12 09:36:51 DEBUG : fcb/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2022/10/12 09:36:51 DEBUG : /: Lookup: name="lbr"
2022/10/12 09:36:51 DEBUG : /: >Lookup: node=lbr/, err=<nil>
2022/10/12 09:36:51 DEBUG : lbr/: Attr:
2022/10/12 09:36:51 DEBUG : lbr/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2022/10/12 09:36:51 DEBUG : /: Lookup: name="rva"
2022/10/12 09:36:51 DEBUG : /: >Lookup: node=rva/, err=<nil>
2022/10/12 09:36:51 DEBUG : rva/: Attr:
2022/10/12 09:36:51 DEBUG : rva/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2022/10/12 09:37:05 INFO : 24.235 MiB / 24.235 MiB, 100%, 196.638 KiB/s, ETA 0s
2022/10/12 09:37:05 DEBUG : /: Lookup: name="rva"
2022/10/12 09:37:05 DEBUG : /: >Lookup: node=rva/, err=<nil>
2022/10/12 09:37:05 DEBUG : rva/: Attr:
2022/10/12 09:37:05 DEBUG : rva/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2022/10/12 09:37:05 DEBUG : rva/: Lookup: name="20200526164253237442000000.jpg"
2022/10/12 09:37:19 INFO : rva/20080605193453522332000000-t.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20080605193453522332000000-t.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20080605193453522332000000-t.jpg was removed, freed 995 bytes
2022/10/12 09:37:19 INFO : rva/20180505140139971851000000.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20180505140139971851000000.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20180505140139971851000000.jpg was removed, freed 54946 bytes
2022/10/12 09:37:19 INFO : rva/20170508043340803652000000-o.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20170508043340803652000000-o.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20170508043340803652000000-o.jpg was removed, freed 632120 bytes
2022/10/12 09:37:19 INFO : rva/20180829143827173616000000-o.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20180829143827173616000000-o.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20180829143827173616000000-o.jpg was removed, freed 103118 bytes
2022/10/12 09:37:19 INFO : rva/20160407134413830587000000-t.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20160407134413830587000000-t.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20160407134413830587000000-t.jpg was removed, freed 2113 bytes
2022/10/12 09:37:19 INFO : rva/20100528142058853552000000-o.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20100528142058853552000000-o.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20100528142058853552000000-o.jpg was removed, freed 11772 bytes
2022/10/12 09:37:19 INFO : rva/20131101124146682705000000-o.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20131101124146682705000000-o.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20131101124146682705000000-o.jpg was removed, freed 308608 bytes
[... lots of debugging ...]
2022/10/12 09:37:19 INFO : rva/20100413145233013372000000.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20100413145233013372000000.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20100413145233013372000000.jpg was removed, freed 4756 bytes
2022/10/12 09:37:19 INFO : rva/20170508043340803652000000.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20170508043340803652000000.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20170508043340803652000000.jpg was removed, freed 17990 bytes
2022/10/12 09:37:19 INFO : rva/20110315173442599061000000-o.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:37:19 DEBUG : rva/20110315173442599061000000-o.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:37:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20110315173442599061000000-o.jpg was removed, freed 26234 bytes
2022/10/12 09:37:19 INFO : vfs cache: cleaned: objects 0 (was 172) in use 0, to upload 0, uploading 0, total size 0 (was 24.235Mi)
2022/10/12 09:37:35 INFO : 24.235 MiB / 24.235 MiB, 100%, 84.976 KiB/s, ETA 0s
2022/10/12 09:38:05 INFO : 24.235 MiB / 24.235 MiB, 100%, 84.976 KiB/s, ETA 0s
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20060311021156926783000000-o.jpg"
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20060311021156926783000000-t.jpg"
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20060311021156926783000000.jpg"
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20060619204904205499000000-o.jpg"
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20060619204904205499000000-t.jpg"
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20060619204904205499000000.jpg"
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20080605193453522332000000-o.jpg"
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20080605193453522332000000-t.jpg"
2022/10/12 09:38:06 DEBUG : rva: Removed virtual directory entry vAddFile: "20080605193453522332000000.jpg"
[... lots of debugging ...]
2022/10/12 09:42:08 DEBUG : rva/20190204161540046985000000-t.jpg: sha1 = 2fde80202889a52005a13197530d3af255129737 OK
2022/10/12 09:42:08 INFO : rva/20190204161540046985000000-t.jpg: Copied (new)
2022/10/12 09:42:08 DEBUG : rva/20190204161540046985000000-t.jpg: vfs cache: fingerprint now "12883,2022-10-12 14:41:48.642 +0000 UTC,2fde80202889a52005a13197530d3af255129737"
2022/10/12 09:42:08 DEBUG : rva/20190204161540046985000000-t.jpg: vfs cache: writeback object to VFS layer
2022/10/12 09:42:08 DEBUG : rva/20180427142348909961000000-o.jpg: sha1 = a7261611014b6a2d29d27981d69a2a8f6e2eddbd OK
2022/10/12 09:42:08 INFO : rva/20180427142348909961000000-o.jpg: Copied (new)
2022/10/12 09:42:08 DEBUG : rva/20180427142348909961000000-o.jpg: vfs cache: fingerprint now "982191,2022-10-12 14:41:58.131 +0000 UTC,a7261611014b6a2d29d27981d69a2a8f6e2eddbd"
2022/10/12 09:42:08 DEBUG : rva/20180427142348909961000000-o.jpg: vfs cache: writeback object to VFS layer
2022/10/12 09:42:09 DEBUG : rva/20200723121018433702000000.jpg: sha1 = d3f9231607116563e6bc6cba447ad6acb7fbb71a OK
2022/10/12 09:42:09 INFO : rva/20200723121018433702000000.jpg: Copied (new)
2022/10/12 09:42:09 DEBUG : rva/20200723121018433702000000.jpg: vfs cache: fingerprint now "14983,2022-10-12 14:41:55.185 +0000 UTC,d3f9231607116563e6bc6cba447ad6acb7fbb71a"
2022/10/12 09:42:09 DEBUG : rva/20200723121018433702000000.jpg: vfs cache: writeback object to VFS layer
2022/10/12 09:42:09 DEBUG : rva/20150317153826634067000000-o.jpg: sha1 = 5033e31e2d4e60f8ae08f3fe9ef607d8286c3613 OK
2022/10/12 09:42:09 INFO : rva/20150317153826634067000000-o.jpg: Copied (new)
2022/10/12 09:42:09 DEBUG : rva/20150317153826634067000000-o.jpg: vfs cache: fingerprint now "5770432,2022-10-12 14:41:57.329 +0000 UTC,5033e31e2d4e60f8ae08f3fe9ef607d8286c3613"
2022/10/12 09:42:09 DEBUG : rva/20150317153826634067000000-o.jpg: vfs cache: writeback object to VFS layer
2022/10/12 09:42:19 DEBUG : rva/20180427142348909961000000-t.jpg: vfs cache: delaying writeback as --transfers exceeded
2022/10/12 09:42:19 INFO : rva/20090601212417920141000000-t.jpg: vfs cache: removed cache file as Removing old cache file not in use
2022/10/12 09:42:19 DEBUG : rva/20090601212417920141000000-t.jpg: vfs cache: removed metadata from cache as Removing old cache file not in use
2022/10/12 09:42:19 INFO : vfs cache RemoveNotInUse (maxAge=30000000000, emptyOnly=false): item rva/20090601212417920141000000-t.jpg was removed, freed 1365 bytes
2022/10/12 09:42:19 DEBUG : rva/20180427142348909961000000-t.jpg: vfs cache: delaying writeback as --transfers exceeded
2022/10/12 09:42:19 DEBUG : rva/20190204161540046985000000-t.jpg: vfs cache: cancelling upload
2022/10/12 09:42:35 INFO : 688.679 MiB / 688.679 MiB, 100%, 84.976 KiB/s, ETA 0s