This page describes the gcsfuse
command-line options used to interact with
Cloud Storage FUSE.
Synopsis
gcsfuse GLOBAL_OPTIONS BUCKET_NAME MOUNT_POINT
Where:
GLOBAL_OPTIONS
are the options that control how the mount is set up and how Cloud Storage FUSE behaves.BUCKET_NAME
is the name of the bucket to mount. For example,my-mount-bucket
. Optional. Exclude a bucket name from this command to perform dynamic mounting.MOUNT_POINT
is the local directory where the bucket will be mounted. For example,/path/to/mount/point
.
Description
The gcsfuse CLI is used to mount Cloud Storage buckets as file systems on a local machine.
Global options
Global options | Description |
---|---|
--anonymous-access BOOLEAN |
Disables authentication for requests. This flag should be set if you're
using a custom endpoint that doesn't support authentication. This flag
should also be set if you're using Cloud Storage FUSE with public buckets.
The default value is false . |
--app-name VALUE |
The application name of the mount. |
--billing-project VALUE |
Specifies a project to use for billing when the mounted bucket is accessed. This flag is often required when mounting a bucket enabled with Requester Pays. The default project is none. |
--cache-dir VALUE |
Specifies the directory for storing file cache data.
Note: To
enable file caching,
you must specify a directory using |
--client-protocol VALUE |
Specifies the protocol used for communicating with the
Cloud Storage backend. The value must be http1
for HTTP/1.1 or http2 for HTTP/2. The default value is
http1 . |
--config-file VALUE |
Specifies the path to the
configuration file
you want to use to configure Cloud Storage FUSE behaviors. For example,
--config-file /etc/gcsfuse.yaml |
--custom-endpoint VALUE |
Specifies an alternative custom endpoint for fetching data.
The custom endpoint must support the equivalent resources and operations as
the Cloud Storage JSON endpoint,
https://storage.googleapis.com/storage/v1 .
If a custom endpoint isn't specified, Cloud Storage FUSE uses the global
Cloud Storage JSON API endpoint,
https://storage.googleapis.com/storage/v1 .
If authentication isn't supported on the custom endpoint you specify, set
the --anonymous-access flag to true to
bypass authentication.
|
--debug_fuse BOOLEAN |
Deprecated. Enables
FUSE-related
debugging output. This option has been replaced by the
--log-severity option. To enable debugging output, set the
--log-severity option to trace , which includes
trace, debug, info, warning, and error logs. |
--debug_gcs BOOLEAN |
Deprecated. Prints Cloud Storage request and
timing information. This option has been replaced by the
--log-severity option. To enable debugging output, set the
--log-severity option to trace , which includes
trace, debug, info, warning, and error logs. |
--debug_invariants BOOLEAN |
Exits the program when internal invariant violations are detected. The
default value is false . |
--debug_mutex BOOLEAN |
Prints debug messages when a mutex is held too long. If this option is
specified, the severity level of logs is automatically set to
trace , which includes trace, debug, info, warning, and error
logs. The default value is false . |
--dir-mode VALUE |
Permissions bits for directories, in octal. The minimum value is
000 and the maximum value is 777 . The default
value is 755 . |
--enable-nonexistent-type-cache BOOLEAN |
Creates a type cache entry with the type NonexistentType
if a file isn't found in Cloud Storage. If the file gets created
in Cloud Storage but the NonexistentType entry for
the file is cached, then Cloud Storage FUSE cannot request that file until
the NonexistentType entry is removed from the type cache.
The default value is false . |
--file-cache-cache-file-for-range-read BOOLEAN |
Determines whether the full object should be
downloaded asynchronously and stored in the Cloud Storage FUSE cache directory
when the first read is completed from a non-zero offset. This flag should
be set to Note: If you perform a partial read starting at offset
|
--file-cache-download-chunk-size-mb VALUE |
Specifies the size of each read request in MiB that each
goroutine makes to
Cloud Storage when downloading the object into the file cache.
The default value is |
--file-cache-enable-parallel-downloads BOOLEAN |
Accelerates reads of large files by using the file cache directory
as a prefetch buffer using multiple workers to download large files in
parallel. The default value is To use parallel downloads, you must enable file caching. To learn more about parallel downloads and configure its supporting properties, see Improve read performance using parallel downloads. |
--file-cache-max-parallel-downloads VALUE |
The maximum number of goroutines that can be spawned at any given
time across all the download jobs of files. The default is twice the number
of CPU cores on your machine or |
--file-mode VALUE |
Specifies permissions bits for files, in octal. The minimum value is
000 and the maximum value is 777 . The default
value is 644 . |
--foreground BOOLEAN |
Runs the gcsfuse command in the foreground. The default
value is false . |
--gid VALUE |
Specifies the Group Identifier (GID) owner of all inodes. The value must
be an integer. The default value is -1 . |
--help or -h |
Displays help about Cloud Storage FUSE. |
version or -v |
Displays the Cloud Storage FUSE version you have installed. |
--http-client-timeout VALUE |
Specifies how long the Cloud Storage FUSE HTTP client can
wait to get a response from the server before timing out. The value must
be a time duration. For example, 1h10m10s . The
default value is 0s , which indicates no timeout. |
--ignore-interrupts VALUE |
Instructs Cloud Storage FUSE to ignore system interrupt signals, like
SIGINT triggered by Control+C . This prevents signals from
terminating in-flight operations. Values are true
or false . The default value is true . |
--implicit-dirs BOOLEAN |
Implicitly includes folders and managed folders. See the files and directories documentation in GitHub for more information. The default value isfalse . |
--kernel-list-cache-ttl-secs VALUE |
Enables the
list cache
and defines the time to live (TTL) in seconds of cached
list entries. The list cache is kept in memory in the page cache, which is
controlled by the kernel based on available memory. The default value is
0 which disables list caching.
To set the --kernel-list-cache-ttl-secs flag, specify a
positive integer value in seconds to keep the directory list response in the
kernel's page cache. To bypass entry expiration and always return the list
response from the cache when it's available, specify a value of
-1 .
|
--key-file VALUE |
Specifies an absolute path to the credential JSON key file for authenticating requests to Cloud Storage. By default, Cloud Storage FUSE uses Application Default Credentials to authenticate requests. |
--limit-bytes-per-sec VALUE |
Specifies the bandwidth limit at which Cloud Storage FUSE can read data from
Cloud Storage, measured over a 30-second window. The value must be
a floating point number. The default value is -1 , which
specifies no limit.
|
--limit-ops-per-sec VALUE |
Specifies a limit for operations performed per second, measured over a
30-second window. The value must be a floating-point number. The default
value is -1 , which specifies no limit. |
--log-file VALUE |
Specifies the file for storing logs that can be parsed by
Fluentd. When not
provided, plain text logs are printed to stdout when
Cloud Storage FUSE is run in the foreground, or to syslog when
Cloud Storage FUSE is run in the background. |
--log-format VALUE |
Specifies the format of the log file. The value must be either
text or json . The default value is
json . |
--log-rotate-backup-file-count VALUE |
The maximum number of rotated log files to retain, excluding the active
file that logs are written to. When the value is set to 0 , all
rotated log files are retained. If this field is unspecified, the value
defaults to 10 . |
--log-rotate-compress BOOLEAN |
A boolean value that specifies whether rotated log files are compressed
using gzip . If this flag
is unspecified, the value defaults to true . |
--log-rotate-max-file-size-mb VALUE |
The maximum size in megabytes (MB) that log files can reach before being
rotated. The minimum value is 1 . If this field is unspecified,
the value defaults to 512 . |
--log-severity ENUM |
The severity of logs you want Cloud Storage FUSE to generate, expressed as an enum. The severity levels are ordered from lowest severity to highest severity:
When you specify a severity level, Cloud Storage FUSE generates logs having
equal or higher severity. For example, when you specify
If this field is unspecified, the value defaults to
|
--max-conns-per-host VALUE |
Specifies the maximum number of TCP connections allowed per server.
This becomes effective when --client-protocol is set to
http1 . The value must be between 0 to
2147483647 . The default value is 0 , which
specifies that there is no limit on TCP connections except for limitations
set by your machine's specifications. |
--max-idle-conns-per-host VALUE |
Specifies the maximum number of idle connections allowed per server. The
value must be between 0 to 2147483647 . The
default value is 100 . |
--max-retry-sleep VALUE |
Specifies the maximum duration that Cloud Storage FUSE is allowed to sleep in
a retry loop with
exponential backoff. The value
must be a time duration value. For example, 1h5m50s (1 hour, 5
minutes, and 50 seconds) or 60s (60 seconds). Once the backoff
duration exceeds the specified maximum duration, the retry continues with
the specified maximum duration. The default value is 30s . |
--metadata-cache-ttl-secs VALUE |
Defines the time to live (TTL) in seconds of cached metadata entries.
If this field is unspecified, the value defaults to
|
-o VALUE |
Specifies additional system-specific mount options. Most generic mount options in Some commonly used mount options that are available with the
For more information on other supported mount options, see the Linux FUSE documentation. |
--only-dir VALUE |
Mounts only a specific directory within a bucket. |
--rename-dir-limit VALUE |
Allows the renaming of directories containing fewer descendants than the
specified limit. The value must be between 0 to
2147483647 . The default limit value is 0 . |
--retry-multiplier VALUE |
Specifies the multiplier for exponential backoff between consecutive
retries. The value must be a floating-point number. The default value is
2 .
|
--reuse-token-from-url |
Specifies whether to reuse the token acquired from
--token-url . The default value is true . |
--sequential-read-size-mb VALUE |
Specifies the chunk size of the data to be downloaded from
Cloud Storage, in megabytes (MB). The value must be between
1 and 1024 . The default value is
200 . |
--stackdriver-export-interval VALUE |
Exports metrics to stackdriver with the specified interval. The value
must be a time duration. For example, 1h10m10s . The default
value is 0s , which specifies no exporting. |
--stat-cache-capacity VALUE |
Deprecated. Specifies the number of entries that the stat cache
can hold. This impacts memory consumption. The value must be an integer.
The default value is 4096 .
This flag has been replaced by --stat-cache-max-size-mb .
To specify the maximum size in mebibytes (MiB) that the stat cache can use,
use the --stat-cache-max-size-mb flag. |
--stat-cache-max-size-mb VALUE |
The maximum size in mebibytes (MiB) that the stat cache can use. The stat cache is always entirely kept in memory.
If this field is unspecified, the value defaults to
|
--stat-cache-ttl VALUE |
Deprecated. Specifies how long to cache StatObject
results and inode attributes. The default value is 60s
(60 seconds).
This flag has been replaced by --metadata-cache-ttl-secs .
To specify the time to live (TTL) in seconds for cached metadata entries,
use the --metadata-cache-ttl-secs flag. |
--temp-dir VALUE |
Specifies a path to the temporary directory where writes are staged
prior to being uploaded to Cloud Storage. The default value is your
system default, most likely /tmp . |
--token-url VALUE |
Specifies a URL for getting an access token when the
--key-file is absent. |
--type-cache-ttl VALUE |
Deprecated. Specifies how long to cache the mapping between
names and files or directories in directory inodes. This option has
been replaced by the --metadata-cache-ttl-secs option. To
specify the length of time you want to set for the type cache, use the
--metadata-cache-ttl-secs option, which specifies the
time to live (TTL) of metadata entries of both stat and type caches.
The default value for --metadata-cache-ttl-secs is
60s (60 seconds). |
--type-cache-max-size-mb VALUE |
The maximum size in MiB per directory that the type cache can use. The type cache is always entirely kept in memory.
If this field is unspecified, the value defaults to
|
--uid VALUE |
Specifies the User Identifier (UID) owner of all inodes. The value must
be an integer. The default UID value is -1 . |