This document describes the gcsfuse command options used to interact with
Cloud Storage FUSE. If you're using the Cloud Storage FUSE CSI driver to mount your
buckets to your local file system in Google Kubernetes Engine, see
Mount options for the Cloud Storage FUSE CSI driver.
The Cloud Storage FUSE command line interface (CLI), or gcsfuse CLI,
is used to mount Cloud Storage buckets as file systems on a local
machine.
gcsfuse CLI command structure
The following example shows the structure of the gcsfuse command, including
required commands and optional gcsfuse options.
gcsfuse GLOBAL_OPTIONS BUCKET_NAME MOUNT_POINT
Replace the following:
- GLOBAL_OPTIONSare the- gcsfuseoptions that control how the mount is set up and how Cloud Storage FUSE behaves.
- BUCKET_NAMEis 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_POINTis the local directory where the bucket will be mounted. For example,- /path/to/mount/point.
gcsfuse CLI options
| gcsfuseoption | Description | Valid value | Default value | 
|---|---|---|---|
| 
 | Disables authentication for requests. This option should be set if you're using a custom endpoint that doesn't support authentication. This option should also be set if you're using Cloud Storage FUSE with public buckets. | Boolean value: true,false. | false | 
| 
 | The application name of the mount. | String value, for example: my-bucket-mount. | "" | 
| 
 | Specifies a project to use for billing when the mounted bucket is accessed. This option is often required when mounting a bucket enabled with Requester Pays. | String value representing a project ID. | "" | 
| 
 | Enables the file cache and specifies the directory for storing file cache data. | A path, for example: /tmp/gcsfuse-cache-path. An empty value
  indicates this option is disabled. Thisgcsfuseoption is disabled by default. | "" | 
| 
 | Specifies the protocol used for communicating with the Cloud Storage backend. | 
 | http1 | 
| 
 | Exports metrics to Cloud Monitoring with the specified interval. | Integer representing a value in seconds, for example: 10(10 seconds).0specifies no exporting. | 0 | 
| 
 | Specifies the path to the configuration file you want to use to configure Cloud Storage FUSE behaviors. | A path, for example: /etc/gcsfuse.yaml. | "" | 
| 
 | Specifies an alternative custom endpoint for fetching data.
    The custom endpoint must support the equivalent resources and operations as
    the Cloud Storage JSON endpoint, storage.UNIVERSE_DOMAIN_NAME:443.
    If a custom endpoint isn't specified, Cloud Storage FUSE uses the global
    Cloud Storage JSON API endpoint,storage.googleapis.com:443.
    If authentication isn't supported on the custom endpoint you specify, set
    the--anonymous-accessgcsfuseoption totrueto bypass authentication. | An endpoint, for example: storage.googleapis.com:443. | "" | 
| 
 | Enables
    FUSE-related
    debugging output. This option has been replaced by the --log-severitygcsfuseoption. To enable
    debugging output, set the--log-severitygcsfuseoption totrace, which includes trace, debug, info, warning,
    and error logs. | Boolean value: true,false. | false | 
| 
 | Prints Cloud Storage request and timing information. This gcsfuseoption has been replaced by the--log-severitygcsfuseoption. To enable debugging
    output, set the--log-severitygcsfuseoption totrace, which includes trace, debug, info, warning, and error
    logs. | Boolean value: true,false. | false | 
| 
 | Exits the program when internal invariant violations are detected. | Boolean value: true,false. | false | 
| 
 | Prints debug messages when a mutex is held too long. If this gcsfuseoption is specified, the severity level of logs is
    automatically set totrace, which includes trace, debug, info,
    warning, and error logs. | Boolean value: true,false. | false | 
| 
 | Permissions bits for directories, in octal. | Integer between 000and777(inclusive). | 755 | 
| 
 | Specifies asynchronous prefetching of parts of a Cloud Storage object into an in-memory buffer, allowing subsequent reads to be served from the buffer instead of requiring network calls. | Boolean value: true,false | false | 
| 
 | Creates a type cache entry with the type NonexistentTypeif a file isn't found in Cloud Storage. If the file gets created
    in Cloud Storage but theNonexistentTypeentry for
    the file is cached, then Cloud Storage FUSE cannot request that file until
    theNonexistentTypeentry is removed from the type cache. | Boolean value: true,false. | false | 
| 
 | Controls the write path flow so that data is uploaded directly to
  Cloud Storage as its written instead of fully staging the write locally
  and uploading it upon close()orfsync().
  For more information about streaming writes, see
  Cloud Storage FUSE semantics in the Cloud Storage FUSE GitHub documentation. | Boolean value: true,false. | true | 
| 
 | Specifies the maximum size in MiB that the file cache can use and lets you limit the total capacity the file cache can use within its mounted directory. | 
 | -1 | 
| 
 | 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 gcsfuseoption should be set totrueif you plan
    to perform several random reads or partial reads. | Boolean value: true,false. | false | 
| 
 | Specifies the size of each read request in MiB that each goroutine makes to Cloud Storage when downloading the object into the file cache. | Integer | 200 | 
| 
 | Accelerates reads of large files by using the file cache directory as a prefetch buffer using multiple workers to download multiple parts of a file in parallel. Parallel downloads are automatically enabled when you enable file caching. To learn more about file caching, see File caching in Cloud Storage FUSE. To learn more about parallel downloads and how to configure supporting properties, Parallel downloads. | Boolean value: true,false. | true | 
| 
 | The maximum number of goroutines that can be spawned at any given time across all the download jobs of files. | 
 | Twice the number of CPU cores on your machine or 16,
  whichever is higher. | 
| 
 | The number of concurrent download requests per file. | Integer | 16 | 
| 
 | Specifies permissions bits for files, in octal. | Integer between 000and777(inclusive). | 644 | 
| 
 | Runs the gcsfusecommand in the foreground. | Boolean value: true,false. | false | 
| 
 | Specifies the Group Identifier (GID) owner of all inodes. | 
 | -1 | 
| 
 | Displays help about Cloud Storage FUSE. | None | None | 
| 
 | Displays the Cloud Storage FUSE version you have installed. | None | None | 
| 
 | Specifies how long the Cloud Storage FUSE HTTP client can wait to get a response from the server before timing out. | Duration, for example: 1h10m10sfor 1 hour, 10 minutes,
  and 10 seconds.0sspecifies no timeout. | 0s | 
| 
 | Instructs Cloud Storage FUSE to ignore system interrupt signals, like
    SIGINT triggered by Control+C. This prevents signals from
    terminating in-flight operations. | Boolean value: true,false. | true | 
| 
 | Implicitly includes folders and managed folders. See Files and directories in the Cloud Storage FUSE GitHub documentation for more information. | Boolean value: true,false. | false | 
| 
 | 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. | 
 | 0 | 
| 
 | 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. | A path, for example: /home/example_user/gcloud-key.json. | When this option is not set, Application Default Credentials are used. | 
| 
 | Specifies the bandwidth limit at which Cloud Storage FUSE can read data from Cloud Storage, measured over a 30-second window. | Floating point number. -1specifies no limit. | -1 | 
| 
 | Specifies a limit for operations performed per second, measured over a 30-second window. | Floating point number. -1specifies no limit. | -1 | 
| 
 | Specifies the file for storing logs that can be parsed by Fluentd. | A path, for example: /tmp/user-example-bucket-gcsfuse-logs.txt. | stdoutwhen
    Cloud Storage FUSE is run in the foreground orsyslogwhen
    Cloud Storage FUSE is run in the background | 
| 
 | Specifies the format of the log file. | 
 | json | 
| 
 | The maximum number of rotated log files to retain, excluding the active file that logs are written to. | 
 | 10 | 
| 
 | Specifies whether rotated log files are compressed
    using gzip. | Boolean value: true,false. | true | 
| 
 | The maximum size in megabytes (MB) that log files can reach before being rotated. | Integer. The minimum value is 1. | 512 | 
| 
 | The severity level you want Cloud Storage FUSE to generate logs for. The
  severity levels are ordered from lowest severity to highest severity. For
  example, when you specify  | 
 | info | 
| 
 | Specifies the maximum number of TCP connections allowed per server.
    This becomes effective when --client-protocolis set tohttp1. | Integer between 0and2147483647.0specifies no limit on TCP connections. | 0 | 
| 
 | Specifies the maximum number of idle connections allowed per server.
    This becomes effective when --client-protocolis set tohttp1. | Integer between 0and2147483647.0specifies no limit on idle connections. | 0 | 
| 
 | Specifies the maximum number of times an operation is retried if the operation fails, preventing endless retry loops. | 
 | 0 | 
| 
 | Specifies the maximum duration that Cloud Storage FUSE is allowed to sleep in a retry loop with exponential backoff. Once the backoff duration exceeds the specified maximum duration, the retry continues with the specified maximum duration. | Duration, for example: 1h5m50s(1 hour, 5 minutes, and
  50 seconds) or60s(60 seconds). | 30s | 
| 
 | Defines the time to live (TTL) in seconds of negative stat cache entries, which store results for non-existent files in the cache. | 
 | 5 | 
| 
 | Defines the time to live (TTL) in seconds of cached metadata entries. | 
 | 60 | 
| 
 | Specifies additional system-specific mount options. Most generic mount
    options in FUSEsuch assuidare supported by
    Cloud Storage FUSE and can be passed along with the-ooption. | Mount options in FUSE,
  for example: 
 | "" | 
| 
 | Mounts only a specific directory within a bucket. | A path, for example: /etc/gcsfuse.yaml. | "" | 
| 
 | Applies a predefined, optimized set of Cloud Storage FUSE configurations for caching, threading, and buffer sizes to help you achieve high performance for a specific workload type, such as training, serving, and checkpointing. To learn more about each predefined configuration based on your workload type, see Profile-based configurations for AI/ML workloads. | 
 | "" | 
| 
 | Exposes Prometheus metrics endpoint on the specified port and
   | Integer representing the port you want to specify. | 0 | 
| 
 | Specifies the maximum number of blocks available for buffered reads across all file handles. | 
 | 40 | 
| 
 | Allows the renaming of directories containing fewer descendants than the specified limit. | Integer between 0and2147483647. | 0 | 
| 
 | Specifies the multiplier for exponential backoff between consecutive retries. | Floating-point number. | 2 | 
| 
 | Specifies whether to reuse the token acquired from --token-url. | Boolean value: true,false. | true | 
| 
 | Specifies the chunk size of the data to be downloaded from Cloud Storage, in megabytes (MB). | Integer between 1and1024. | 200 | 
| 
 | Specifies the number of entries that the stat cache can hold. This gcsfuseoption has been replaced by the--stat-cache-max-size-mbgcsfuseoption. | Integer | 4096 | 
| 
 | The maximum size memory that the stat cache can use, in MiB. The stat cache is always entirely kept in memory. | 
 | 32 | 
| 
 | Specifies how long to cache StatObjectresults and inode
  attributes. This option has been replaced by the--metadata-cache-ttl-secsgcsfuseoption. | Duration, for example: 20s(20 seconds). | 60s | 
| 
 | Specifies a path to the temporary directory where writes are staged prior to being uploaded to Cloud Storage. | A path, for example: /mnt/ssd/example-user-gcsfuse-temp-dir. |  | 
| 
 | Specifies a URL for getting an access token when the --key-fileis absent. | A URL. | "" | 
| 
 | Specifies how long to cache the mapping between
    names and files or directories in directory inodes, in seconds. This gcsfuseoption has been replaced by the--metadata-cache-ttl-secsgcsfuseoption. | Duration in seconds, for example: 20s(20 seconds). | 60s | 
| 
 | The maximum size in MiB per directory that the type cache can use. The type cache is always entirely kept in memory. | 
 | 4 | 
| 
 | Specifies the User Identifier (UID) owner of all inodes. | 
 | -1 | 
| 
 | Specifies the maximum number of data chunks available for streaming writes across all files. Each file uses one 32 MiB data chunk by default. | 
 | 
 |