Version v1.70.0
This commit is contained in:
@@ -7,8 +7,6 @@ versionIntroduced: v1.65
|
||||
---
|
||||
# rclone serve nfs
|
||||
|
||||
*Not available in Windows.*
|
||||
|
||||
Serve the remote as an NFS mount
|
||||
|
||||
## Synopsis
|
||||
@@ -55,7 +53,7 @@ that it uses an on disk cache, but the cache entries are held as
|
||||
symlinks. Rclone will use the handle of the underlying file as the NFS
|
||||
handle which improves performance. This sort of cache can't be backed
|
||||
up and restored as the underlying handles will change. This is Linux
|
||||
only. It requres running rclone as root or with `CAP_DAC_READ_SEARCH`.
|
||||
only. It requires running rclone as root or with `CAP_DAC_READ_SEARCH`.
|
||||
You can run rclone with this extra permission by doing this to the
|
||||
rclone binary `sudo setcap cap_dac_read_search+ep /path/to/rclone`.
|
||||
|
||||
@@ -79,6 +77,12 @@ Where `$PORT` is the same port number used in the `serve nfs` command
|
||||
and `$HOSTNAME` is the network address of the machine that `serve nfs`
|
||||
was run on.
|
||||
|
||||
If `--vfs-metadata-extension` is in use then for the `--nfs-cache-type disk`
|
||||
and `--nfs-cache-type cache` the metadata files will have the file
|
||||
handle of their parent file suffixed with `0x00, 0x00, 0x00, 0x01`.
|
||||
This means they can be looked up directly from the parent file handle
|
||||
is desired.
|
||||
|
||||
This command is only available on Unix platforms.
|
||||
|
||||
## VFS - Virtual File System
|
||||
@@ -178,11 +182,11 @@ seconds. If rclone is quit or dies with files that haven't been
|
||||
uploaded, these will be uploaded next time rclone is run with the same
|
||||
flags.
|
||||
|
||||
If using `--vfs-cache-max-size` or `--vfs-cache-min-free-size` note
|
||||
If using `--vfs-cache-max-size` or `--vfs-cache-min-free-space` note
|
||||
that the cache may exceed these quotas for two reasons. Firstly
|
||||
because it is only checked every `--vfs-cache-poll-interval`. Secondly
|
||||
because open files cannot be evicted from the cache. When
|
||||
`--vfs-cache-max-size` or `--vfs-cache-min-free-size` is exceeded,
|
||||
`--vfs-cache-max-size` or `--vfs-cache-min-free-space` is exceeded,
|
||||
rclone will attempt to evict the least accessed files from the cache
|
||||
first. rclone will start with files that haven't been accessed for the
|
||||
longest. This cache flushing strategy is efficient and more relevant
|
||||
@@ -507,6 +511,45 @@ _WARNING._ Contrary to `rclone size`, this flag ignores filters so that the
|
||||
result is accurate. However, this is very inefficient and may cost lots of API
|
||||
calls resulting in extra charges. Use it as a last resort and only with caching.
|
||||
|
||||
## VFS Metadata
|
||||
|
||||
If you use the `--vfs-metadata-extension` flag you can get the VFS to
|
||||
expose files which contain the [metadata](/docs/#metadata) as a JSON
|
||||
blob. These files will not appear in the directory listing, but can be
|
||||
`stat`-ed and opened and once they have been they **will** appear in
|
||||
directory listings until the directory cache expires.
|
||||
|
||||
Note that some backends won't create metadata unless you pass in the
|
||||
`--metadata` flag.
|
||||
|
||||
For example, using `rclone mount` with `--metadata --vfs-metadata-extension .metadata`
|
||||
we get
|
||||
|
||||
```
|
||||
$ ls -l /mnt/
|
||||
total 1048577
|
||||
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
|
||||
|
||||
$ cat /mnt/1G.metadata
|
||||
{
|
||||
"atime": "2025-03-04T17:34:22.317069787Z",
|
||||
"btime": "2025-03-03T16:03:37.708253808Z",
|
||||
"gid": "1000",
|
||||
"mode": "100664",
|
||||
"mtime": "2025-03-03T16:03:39.640238323Z",
|
||||
"uid": "1000"
|
||||
}
|
||||
|
||||
$ ls -l /mnt/
|
||||
total 1048578
|
||||
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
|
||||
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
|
||||
```
|
||||
|
||||
If the file has no metadata it will be returned as `{}` and if there
|
||||
is an error reading the metadata the error will be returned as
|
||||
`{"error":"error string"}`.
|
||||
|
||||
|
||||
|
||||
```
|
||||
@@ -543,6 +586,7 @@ rclone serve nfs remote:path [flags]
|
||||
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
|
||||
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
|
||||
--vfs-links Translate symlinks to/from regular files with a '.rclonelink' extension for the VFS
|
||||
--vfs-metadata-extension string Set the extension to read metadata from
|
||||
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
|
||||
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
|
||||
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
|
||||
@@ -570,6 +614,7 @@ Flags for filtering directory listings
|
||||
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
|
||||
-f, --filter stringArray Add a file filtering rule
|
||||
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
|
||||
--hash-filter string Partition filenames by hash k/n or randomly @/n
|
||||
--ignore-case Ignore case in filters (case insensitive)
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read file include patterns from file (use - to read from stdin)
|
||||
|
||||
Reference in New Issue
Block a user