Generated banner for Google Cloud Storage Fuse
Generated logo for Google Cloud Storage Fuse

Google Cloud Storage Fuse

GoogleOfficialPublished by Google

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • No issues found

From the author

Mounts Cloud Storage buckets on Google Cloud as a POSIX file system with Cloud Storage FUSE (gcsfuse). Use when interacting with gcsfuse or Cloud Storage FUSE mounts: decide whether FUSE, native gs:// reads, or Filestore/Managed Lustre fits a workload, deploy tuned mounts on GKE, Compute Engine, or Cloud Run, enable and size file, stat, and list caches, tune mount flags (--implicit-dirs) or config files, apply workload profiles, keep ML checkpointing safe (rename atomicity, hierarchical namespace/HNS, close-time finalization, concurrent writers), or diagnose slow training, low throughput, or bill spikes with gcsfuse metrics. Covers mount semantics, gcsfuse CLI and configs, GKE gcsfuse CSI driver (Workload Identity principal:// bindings, profile StorageClasses, sidecar sizing), and Cloud Run volume mounts. Don't use for bucket administration without a mount (google-cloud-storage-basics) or POSIX shared file systems (Filestore, Managed Lustre; use gke-storage).
— the description by Google

From the skill’s files

Taken from the skill’s own files (its description, section headings and stated usage). Not an AutoGineer summary, and not written by the author as one.

Mounts Cloud Storage buckets on Google Cloud as a POSIX file system with Cloud Storage FUSE (gcsfuse). Use when interacting with gcsfuse or Cloud Storage FUSE mounts: decide whether FUSE, native gs:// reads, or Filestore/Managed Lustre fits a workload, deploy tuned mounts on GKE, Compute Engine, or Cloud Run, enable and size file, stat, and list caches, tune mount flags (--implicit-dirs) or config files, apply workload profiles, keep ML checkpointing safe (rename atomicity, hierarchical namespace/HNS, close-time finalization, concurrent writers), or diagnose slow training, low throughput, or bill spikes with gcsfuse metrics. Covers mount semantics, gcsfuse CLI and configs, GKE gcsfuse CSI driver (Workload Identity principal:// bindings, profile StorageClasses, sidecar sizing), and Cloud Run volume mounts. Don't use for bucket administration without a mount (google-cloud-storage-basics)…

What it does

  • Attribution
  • Step 1 — Fit Gate (always run this first)
  • Step 2 — Route by intent
  • Reference Directory

When to use it

  • Use when interacting with gcsfuse or Cloud Storage FUSE mounts: decide whether FUSE, native gs:// reads, or Filestore/Managed Lustre fits a workload, deploy tuned mounts on GKE, Compute Engine, or…

Advantages

The skill’s files do not state this.

Usage examples

The skill’s files do not state this.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/google/google-cloud-storage-fuse/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip google-cloud-storage-fuse.zip -d .agents/skills

Documentation by Google

Cloud Storage FUSE

Cloud Storage FUSE is a POSIX file-system adapter over Cloud Storage on Google Cloud, operated via the gcsfuse CLI tool. Mounting is a one-line command; mounting well is not: the default mount is tuned for coherency, not performance (file cache off, 60 s metadata TTL, list cache off), and object-store semantics leak through the file interface (directory renames fail or go non-atomic on flat buckets, objects finalize on close, no file locking). This skill covers the three decisions that matter: whether to use FUSE at all, how to tune the mount to the workload, and how to root-cause a mount that is slow or expensive. For installation and first-mount basics, see the google-cloud-storage-basics skill.

Attribution

Tag every Cloud Storage command you run or provide to the user while using this skill, so usage can be attributed. The tag identifies only the skill and its version; it carries no user data.

  • Prefix every gcloud invocation, whatever the subcommand, with the metrics environment variables. Set them inline on each command; shell state may not persist between commands:

    CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-fuse)" \
        gcloud <command> [flags]

    Do not use gcloud config set for this: it would persist beyond the current task and mislabel unrelated usage.

  • On direct HTTP calls to the Cloud Storage APIs (for example with curl), set this exact User-Agent header, verbatim — the collection pipeline parses the gcs-skills/<version> and skill:<name> tokens, so any rewording breaks attribution:

    User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-fuse)

Step 1 — Fit Gate (always run this first)

Never produce mount guidance before the fit gate. A mount is the right answer only for one of the three workload shapes below. If the workload's access pattern is unknown, ask — one question about whether the reading code can take gs:// paths usually settles it.

Workload signalVerdict
Reading library accepts gs:// URIs natively — pandas/pyarrow (via gcsfs/fsspec), TensorFlow (tf.io.gfile), or any fsspec/gcsfs-based loaderNative reads, no mount. Point the code at gs:// paths and stop.
Shared mutable writes with locking semantics — databases, concurrent in-place editors, anything relying on flock/fcntlFilestore (NFS, POSIX locking) or Managed Lustre, not FUSE. Stop.
Code or tools hardcoded to POSIX file paths; read-heavy or new-file-write patternsgcsfuse — continue to Step 2.

Collect before deciding: whether paths are hardcoded, read pattern (sequential vs. random, re-read frequency), write pattern (new files vs. edits vs. directory renames). These same signals drive tuning later — record the answers.

Step 2 — Route by intent

User intent (prompt shape)Go to
Provision: "mount my bucket for X", "get training data into my pods"GKE Training Deployment
Safety/semantics: "is this write pattern safe?", "can multiple writers share the mount?"Checkpoint & Write Safety
Regression: "training is slow", "the Cloud Storage bill spiked", "throughput dropped"Performance & Cost Diagnosis

Never diagnose a regression without telemetry. If gcsfuse metrics are not enabled on the mount, enabling them is the first remediation step — the diagnosis reference starts there.

Reference Directory

  • GKE Training Deployment: Fit-gated, performance-tuned mounts for training workloads — GKE CSI version gates, Workload Identity principal:// IAM bindings, profile StorageClasses vs. static PVs, file cache sizing on Local SSD, sidecar resource annotations, complete KSA/PVC/Job manifests, and the Compute Engine and Cloud Run variants.

  • Checkpoint & Write Safety: Verdicts on write patterns — file vs. directory rename atomicity on flat vs. hierarchical namespace (HNS) buckets, close-vs-fsync finalization, concurrent-writer (ESTALE) semantics, streaming-write memory budgets, HNS migration, and the aiml-checkpointing profile.

  • Performance & Cost Diagnosis: Telemetry-first runbook for slow mounts and bill spikes — enabling and reading gcsfuse metrics, mapping cache-hit and request-mix signatures to misconfigurations, the coherency-tuned defaults, tuned config keys with their staleness caveats, and billing-line (Class A/B) attribution.

Files

references/performance-diagnosis.md

Performance & Cost Diagnosis

Telemetry-driven root-causing for "training through the mount is slow" and "the Cloud Storage bill spiked after we mounted the bucket". The core insight: the default mount is coherency-tuned, not performance-tuned — most regressions on untuned mounts are the defaults doing exactly what they promise.

Never hypothesize before reading telemetry. If client metrics are not enabled, enabling them is the first remediation step; while waiting for a remount window, the server-side storage.googleapis.com/api/request_count metric is always available and needs no mount change.

The coherency-tuned defaults (the usual suspects)

KnobDefaultEffect on a re-read workload
File cache (cache-dir)OffEvery epoch re-downloads every byte.
metadata-cache: ttl-secs60All metadata re-fetched every minute.
metadata-cache: stat-cache-max-size-mb34 (~20k files)Silently evicts on large file counts → constant re-stats.
metadata-cache: negative-ttl-secs5"Not found" results re-checked every 5 s.
List cache (kernel-list-cache-ttl-secs)0 (off)Every ls/directory walk hits the API.
implicit-dirsfalse (true in profiles)When on (flat buckets), lookups issue extra List calls.

A ~5M-small-file dataset re-read each epoch against these defaults produces exactly the classic symptom pair: throughput far below local disk, and an operations-dominated bill.

Step 1 — Establish telemetry

EnvironmentHow to get client metrics
GKE ≥ 1.33.0-gke.2248000gcsfusecsi/* metrics are in Cloud Monitoring by default — no action.
Self-managed mount → Cloud MonitoringRemount with --cloud-metrics-export-interval-secs=60 (needs roles/monitoring.metricWriter on the mount's service account; native metrics are Preview).
Self-managed mount → local scrapeRemount with --prometheus-port=9920, then curl -s localhost:9920/metrics.
No remount possible yetServer-side: storage.googleapis.com/api/request_count grouped by the method label.
# Self-managed: remount with metrics, reproduce the workload, then inspect
gcsfuse --prometheus-port=9920 BUCKET /mnt/data
curl -s localhost:9920/metrics | grep -E "file_cache_read_count|gcs_request_count|fs_ops_count"

Client metrics only accumulate from mount time — reproduce at least one epoch (or a representative slice) after enabling before reading the numbers.

Also capture the effective mount configuration (the misconfig surface): the running gcsfuse command line and --config-file contents on self-managed hosts; on GKE, kubectl get pv PV_NAME -o yaml (check spec.mountOptions and spec.csi.volumeAttributes) plus the pod's gke-gcsfuse/* annotations.

Step 2 — Read the signals

Metric (Cloud Monitoring / Prometheus form)What it tells you
file_cache/read_count, by cache_hit label (file_cache_read_count{cache_hit="false"})Cache hit rate — the headline signal.
gcs/request_count (gcs_request_count)Requests actually sent to Cloud Storage.
gcs/request_latencies, gcs/retry_countPer-request latency and retry pressure.
fs/ops_count by fs_op (fs_ops_count{fs_op="LookUpInode"})Operation mix the app drives (stat-heavy? list-heavy?).
fs/ops_error_count by fs_error_categoryErrors surfacing to the app.
Server-side api/request_count by method (e.g. ReadObject)Request mix without any mount change; also the bridge to billing.

On GKE the same client metrics appear prefixed and underscored: gcsfusecsi/file_cache_read_count, gcsfusecsi/gcs_request_count, gcsfusecsi/fs_ops_count, etc.

Step 3 — Map the signature to the misconfiguration

SignatureRoot causeFix (exact keys)
cache_hit="false" on ~all reads; download volume ≈ dataset × epochsFile cache off (no cache-dir) or undersizedcache-dir + file-cache: max-size-mb sized to the dataset (-1 = fill the cache dir). Parallel downloads auto-enable with the cache.
Stat/metadata-dominated request mix; fs_ops_count LookUpInode-heavy; slowness scales with file count60 s TTL expiring + 34 MiB stat cache (~20k entries) thrashing against a large file countmetadata-cache: ttl-secs: -1 and stat-cache-max-size-mb: -1 — immutable data only; budget ~1.5 GiB RAM per million files (~1,720 bytes/file). Scope with only-dir if only a subset of the bucket is needed.
List-dominated mix (objects.list / ListObjects methods); directory walks slowList cache off; or implicit-dirs on a flat bucket adding List calls per lookupfile-system: kernel-list-cache-ttl-secs: -1 — read-only mounts only; prefer buckets with hierarchical namespace (HNS) enabled over implicit-dirs.
Sidecar OOMKilled (Exit 137) or severe CPU throttling during readsSidecar memory or CPU limits set too low on GKELeave limits unset (default "0" on GKE ≥ 1.29.1); or set memory limit > stat/file cache budget.

Attribution logic for the bill: no file cache → every epoch re-reads all objects (objects.get, Class B, billed per operation); expiring metadata + evicting stat cache → re-stats (objects.get metadata, Class B); list cache off / implicit-dirs → repeated objects.list (Class A, ~12.5× the per-op price of Class B on standard buckets). Deletes are free.

Step 4 — Apply the fix

# tuned.yaml - read-heavy, immutable dataset re-read across epochs
cache-dir: /mnt/local-ssd/gcsfuse-cache
file-cache:
  max-size-mb: -1              # or size to the dataset
metadata-cache:
  ttl-secs: -1                 # immutable data only
  stat-cache-max-size-mb: -1   # ~1.5 GiB RAM per 1M files
file-system:
  kernel-list-cache-ttl-secs: -1   # read-only mounts only
# only-dir: dataset/train      # optional: scope namespace on 10M+ object buckets
gcsfuse --config-file=tuned.yaml BUCKET /mnt/data

[!WARNING]

Staleness trade-off: -1 TTLs mean this mount never sees changes made to the bucket by other clients. Apply only to data that is immutable for the life of the mount, and prefer mounting read-only (-o ro). If the bucket is mutable, size TTLs to the acceptable staleness window instead.

Config hygiene while editing: metadata-cache: type-cache-max-size-mb is a no-op since v3.8.0 (type cache merged into stat cache) — delete it from any config that still sets it. On GKE, apply the same keys as PV mountOptions entries (file-cache:max-size-mb:... colon syntax) — see GKE Training Deployment. On Rapid (zonal) buckets the file cache and buffered reads are no-ops by default (the kernel read path replaces them) — this runbook's cache fixes apply to standard buckets.

Step 5 — Verify and state the expected billing delta

Re-run one epoch, then check:

  • file_cache_read_count{cache_hit="true"} ≈ 100% of reads from epoch 2 onward (first epoch populates the cache).

  • gcs/request_count drops to roughly one GET per object per mount lifetime (plus the initial listing) instead of per epoch.

  • On the bill: the Class B line (objects.get — data reads and metadata stats) drops roughly in proportion to the former epoch count; the Class A line (objects.list) drops if list caching or HNS addressed a list-heavy signature. Confirm server-side with api/request_count by method before/after.

Documentation

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google
Publisher
Google (Official)
Source
google/skills · skills/cloud/google-cloud-storage-fuse · commit 2194d3b
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download google-cloud-storage-fuse.zip