5 title: arv-mount options
8 Copyright (C) The Arvados Authors. All rights reserved.
10 SPDX-License-Identifier: CC-BY-SA-3.0
13 This page documents all available @arv-mount@ options with some usage examples.
15 # "Mount contents":#contents
16 # "Mount custom layout and filtering":#layout
17 ## "@--filters@ usage and limitations":#filters
18 # "Mount access and permissions":#access
19 # "Mount lifecycle management":#lifecycle
20 # "Mount logging and statistics":#logging
21 # "Mount local cache setup":#cache
22 # "Mount interactions with Arvados and Linux":#plumbing
23 # "Examples":#examples
24 ## "Using @--exec@":#exec
25 ## "Running arv-mount as a systemd service":#systemd
27 h2(#contents). Mount contents
29 table(table table-bordered table-condensed).
30 |_. Option(s)|_. Description|
31 |@--all@|Mount a subdirectory for each mode: @home@, @shared@, @by_id@, and @by_tag@ (default if no @--mount-*@ options are given)|
32 |@--custom@|Mount a subdirectory for each mode specified by a @--mount-*@ option (default if any @--mount-*@ options are given; see "Mount custom layout and filtering":#layout section)|
33 |@--collection UUID_OR_PDH@|Mount the specified collection|
34 |@--home@|Mount your home project|
35 |@--project UUID@|Mount the specified project|
36 |@--shared@|Mount a subdirectory for each project shared with you|
37 |@--by-id@|Mount a magic directory where collections and projects are accessible through subdirectories named after their UUID or portable data hash|
38 |@--by-pdh@|Mount a magic directory where collections are accessible through subdirectories named after their portable data hash|
39 |@--by-tag@|Mount a subdirectory for each tag attached to a collection or project|
41 h2(#layout). Mount custom layout and filtering
43 table(table table-bordered table-condensed).
44 |_. Option(s)|_. Description|
45 |@--filters FILTERS@|Filters to apply to all project, shared, and tag directory contents. Pass filters as either a JSON string or a path to a JSON file. The JSON object should be a list of filters in "Arvados API list filter syntax":{{ site.baseurl }}/api/methods.html#filters. See the "example filters":#filters.|
46 |@--mount-home PATH@|Make your home project available under the mount at @PATH@|
47 |@--mount-shared PATH@|Make projects shared with you available under the mount at @PATH@|
48 |@--mount-tmp PATH@|Make a new temporary writable collection available under the mount at @PATH@. This collection is deleted when the mount is unmounted.|
49 |@--mount-by-id PATH@|Make a magic directory available under the mount at @PATH@ where collections and projects are accessible through subdirectories named after their UUID or portable data hash|
50 |@--mount-by-pdh PATH@|Make a magic directory available under the mount at @PATH@ where collections are accessible through subdirectories named after portable data hash|
51 |@--mount-by-tag PATH@|Make a subdirectory for each tag attached to a collection or project available under the mount at @PATH@|
53 h3(#filters). @--filters@ usage and limitations
55 Your argument to @--filters@ should be a JSON list of filters in "Arvados API list filter syntax":{{ site.baseurl }}/api/methods.html#filters. If your filter checks any field besides @uuid@, you should prefix it with the @<resource type>.@ Taken together, here's an example that mounts your home directory excluding filter groups, workflow intermediate output collections, and workflow log collections:
58 <pre><code>$ arv-mount --home <span class="userinput">--filters '[["groups.group_class", "!=", "filter"], ["collections.properties.type", "not in", ["intermediate", "log"]]]'</span> ...
62 Because filters can be awkward to write on the command line, you can also write them in a file, and pass that file path to the @--filters@ option. This example does the same filtering:
65 <pre><code>$ <span class="userinput">cat >~/arv-mount-filters.json <<EOF
73 "collections.properties.type",
82 $ arv-mount --home <span class="userinput">--filters ~/arv-mount-filters.json</span> ...
86 The current implementation of @--filters@ has a few limitations. These may be lifted in a future release:
88 * You can always access any project or collection by UUID or portable data hash under a magic directory. If you access a project this way, your filters _will_ apply to the project contents.
89 * Tag directory listings are generated by querying tags alone. Only filters that apply to @links@ will affect these listings.
91 h2(#access). Mount access and permissions
93 table(table table-bordered table-condensed).
94 |_. Option(s)|_. Description|
95 |@--allow-other@|Let other users on this system read mounted data (default false)|
96 |@--read-only@|Mounted data cannot be modified from the mount (default)|
97 |@--read-write@|Mounted data can be modified from the mount|
99 h2(#lifecycle). Mount lifecycle management
101 table(table table-bordered table-condensed).
102 |_. Option(s)|_. Description|
103 |@--exec ...@|Mount data, run the specified command, then unmount and exit. @--exec@ reads all remaining options as the command to run, so it must be the last option you specify. Either end your command arguments (and other options) with a @--@ argument, or specify @--exec@ after your mount point.|
104 |@--foreground@|Run mount process in the foreground instead of daemonizing (default false)|
105 |@--subtype SUBTYPE@|Set mounted filesystem type to @fuse.SUBTYPE@ (default is just @fuse@)|
106 |@--replace@|If a FUSE mount is already mounted at the given directory, unmount it before mounting the requested data. If @--subtype@ is specified, unmount only if the mount has that subtype. WARNING: This command can affect any kind of FUSE mount, not just arv-mount.|
107 |@--unmount@|If a FUSE mount is already mounted at the given directory, unmount it and exit. If @--subtype@ is specified, unmount only if the mount has that subtype. WARNING: This command can affect any kind of FUSE mount, not just arv-mount.|
108 |@--unmount-all@|Unmount all FUSE mounts at or below the given directory, then exit. If @--subtype@ is specified, unmount only if the mount has that subtype. WARNING: This command can affect any kind of FUSE mount, not just arv-mount.|
109 |@--unmount-timeout SECONDS@|The number of seconds to wait for a clean unmount after an @--exec@ command has exited (default 2.0). After this time, the mount will be forcefully unmounted.|
111 h2(#logging). Mount logging and statistics
113 table(table table-bordered table-condensed).
114 |_. Option(s)|_. Description|
115 |@--crunchstat-interval SECONDS@|Write stats to stderr every N seconds (default disabled)|
116 |@--debug@|Log debug information|
117 |@--logfile LOGFILE@|Write debug logs and errors to the specified file (default stderr)|
119 h2(#cache). Mount local cache setup
121 table(table table-bordered table-condensed).
122 |_. Option(s)|_. Description|
123 |@--disk-cache@|Cache data on the local filesystem (default)|
124 |@--ram-cache@|Cache data in memory|
125 |@--disk-cache-dir DIRECTORY@|Set custom filesystem cache location|
126 |@--directory-cache BYTES@|Size of directory data cache in bytes (default 128 MiB)|
127 |@--file-cache BYTES@|Size of file data cache in bytes (default 8 GiB for filesystem cache, 256 MiB for memory cache)|
129 h2(#plumbing). Mount interactions with Arvados and Linux
131 table(table table-bordered table-condensed).
132 |_. Option(s)|_. Description|
133 |@--disable-event-listening@|Don't subscribe to events on the API server to update mount contents|
134 |@--encoding ENCODING@|Filesystem character encoding (default 'utf-8'; specify a name from the "Python codec registry":https://docs.python.org/3/library/codecs.html#standard-encodings)|
135 |@--retries RETRIES@|Maximum number of times to retry server requests that encounter temporary failures (e.g., server down). Default 10.|
136 |@--storage-classes CLASSES@|Comma-separated list of storage classes to request for new collections|
138 h2(#examples). Examples
140 h3(#exec). Using @--exec@
142 There are a couple of details that are important to understand when you use @--exec@:
144 * @--exec@ reads all remaining options as the command to run, so it must be the last option you specify. Either end your command arguments (and other options) with a @--@ argument, or specify @--exec@ after your mount point.
145 * The command you specify runs from the same directory that you started @arv-mount@ from. To access data inside the mount, you will generally need to pass the path to the mount as an argument.
147 For example, this generates a recursive listing of all the projects and collections under your home project:
150 <pre><code>$ <span class="userinput">arv-mount --home --exec find -type d ArvadosHome -- ArvadosHome</span>
154 The first @ArvadosHome@ is a path argument to @find@. The second is the mount point argument to @arv-mount@.
156 h3(#systemd). Running arv-mount as a systemd service
158 If you want to run @arv-mount@ as a long-running service, it's easy to write a systemd service definition for it. We do not publish one because the entire definition tends to be site-specific, but you can start from this template. You must change the @ExecStart@ path. Comments detail other changes you might want to make.
162 Description=Arvados FUSE mount
163 Documentation={{ site.baseurl }}/sdk/fuse/options.html
168 # arv-mount will cache data under a `keep` subdirectory of CacheDirectory.
169 # If this is a system service installed under /etc/systemd/system,
170 # the cache will be at /var/cache/arvados/keep.
171 # The default value of `arvados` lets arv-mount share the cache with other
173 CacheDirectory=arvados
175 # arv-mount will get Arvados API credentials from the `settings.conf` file
176 # under ConfigurationDirectory.
177 # If this is a system service installed under /etc/systemd/system,
178 # the configuration will be read from /etc/arvados/settings.conf.
179 # The default value of `arvados` lets arv-mount read configuration from the
180 # same location as other tools.
181 ConfigurationDirectory=arvados
183 # This unit makes the mount available as `Arvados` under the runtime directory root.
184 # If this is a system service installed under /etc/systemd/system,
185 # the mount will be at /run/Arvados.
186 # If this is a user service installed under ~/.config/systemd/user,
187 # the mount will be at $XDG_RUNTIME_DIR/Arvados.
188 # If you want to mount at another location on the filesystem, remove RuntimeDirectory
189 # and replace both instances of %t/Arvados with your desired path.
190 RuntimeDirectory=Arvados
192 # The arv-mount path must be the absolute path where you installed the command.
193 # If you installed from a distribution package, make this /usr/bin/arv-mount.
194 # If you installed from pip, replace ... with the path to your virtualenv.
195 # You can add options to select what gets mounted, access permissions,
196 # cache size, log level, etc.
197 ExecStart=<span class="userinput">...</span>/bin/arv-mount --foreground %t/Arvados
198 ExecStop=/usr/bin/fusermount -u %t/Arvados