Catalog
google/google-cloud-storage-fuse

google

google-cloud-storage-fuse

Mounts Cloud Storage buckets as a POSIX file system with Cloud Storage FUSE (gcsfuse). Use when you need to interact with gcsfuse — 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 the file, stat, and list caches, tune mount flags or config-file settings, apply workload profiles, keep ML checkpointing safe (rename atomicity, hierarchical namespace, close-time finalization, concurrent writers), or diagnose slow training, low throughput, or Cloud Storage bill spikes on existing mounts with gcsfuse metrics. Covers mount semantics, the gcsfuse CLI and config file, the GKE gcsfuse CSI driver (Workload Identity principal:// bindings, profile StorageClasses, sidecar sizing), and Cloud Run volume mounts. Don't use for bucket administration or data management without a mount (use the google-cloud-storage-basics skill instead) or for fully POSIX-compliant shared file systems (use Filestore or Managed Lustre).

v1.0Latest
New~1.6kUpdated Aug 19, 2026

Google Cloud Storage FUSE

Cloud Storage FUSE (gcsfuse) is a POSIX file-system adapter over Cloud Storage's immutable object store. 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 signal Verdict
Reading library accepts gs:// URIs natively — pandas/pyarrow (via gcsfs/fsspec), TensorFlow (tf.io.gfile), or any fsspec/gcsfs-based loader Native 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/fcntl Filestore (NFS, POSIX locking) or Managed Lustre, not FUSE. Stop.
Code or tools hardcoded to POSIX file paths; read-heavy or new-file-write patterns gcsfuse — 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.

Files4
4 files · 42.7 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Safety

88

Quality

90

Clarity

87

Completeness

84

Summary

A comprehensive skill for mounting and tuning Cloud Storage buckets as POSIX file systems using Cloud Storage FUSE (gcsfuse). It guides agents through a fit gate (deciding when FUSE is appropriate vs. native reads, Filestore, or Lustre), provisioning fit-gated mounts on GKE with performance profiles and authentication, ensuring checkpoint write safety through bucket namespace design, and diagnosing performance and cost regressions using telemetry. Covers mount semantics, CLI/config tuning, GKE CSI driver setup with Workload Identity, and metric-driven root-causing.

Detected Capabilities

gcloud CLI execution with metrics environment variableskubectl command execution (describe, apply, get, exec)Config file generation (YAML mount options and gcsfuse config files)GKE resource manifests (PV, PVC, ServiceAccount, Job, StorageClass references)Cloud Storage bucket creation and IAM policy bindingCloud Monitoring metric queries and interpretationPrometheus metrics scraping (localhost:9920)HTTP requests to Cloud Storage APIs with custom User-Agent headers

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

mount gcs bucketgcsfuse training deploymentcheckpoint write safetygke file systemgcs performance diagnosiscloud storage fuse tuningdiagnose slow throughputfile cache configuration

Risk Signals

INFO

gcloud commands prefixed with CLOUDSDK_METRICS_ENVIRONMENT variables for telemetry attribution

SKILL.md, references/checkpoint-safety.md, references/gke-training-deployment.md, references/performance-diagnosis.md
INFO

HTTP User-Agent header construction for Cloud Storage API calls

SKILL.md § Attribution
INFO

kubectl apply and exec commands for Kubernetes resource provisioning

references/gke-training-deployment.md § Step 6
INFO

IAM policy binding using gcloud storage buckets add-iam-policy-binding with principal:// URIs

references/gke-training-deployment.md § Step 2
WARNING

Instruction to disable/skip CSI bucket access checks (skipCSIBucketAccessCheck: true) on cross-project mounts

references/gke-training-deployment.md § Step 2 & Manifests A/B
WARNING

Config file with infinite metadata TTL (-1) and unlimited stat cache for immutable-data-only scenarios

references/performance-diagnosis.md § Step 4, references/gke-training-deployment.md Manifest B
INFO

Warnings about staleness trade-offs and requirement for immutable data when using infinite TTLs

references/performance-diagnosis.md § Step 4
INFO

Explicit security boundary documented: fit gate prevents FUSE recommendation for shared-mutable-writes workloads (recommends Filestore/Lustre instead)

SKILL.md § Step 1 — Fit Gate
INFO

Scope limitation documented: skill does not cover bucket administration or data management without a mount

SKILL.md frontmatter description

Referenced Domains

External domains referenced in skill content, detected by static analysis.

cloud.google.comdocs.cloud.google.comgithub.comwww.apache.org

Use Cases

  • Mount Cloud Storage buckets as POSIX file systems for training workloads with hardcoded file paths
  • Decide whether gcsfuse, native gs:// APIs, Filestore, or Managed Lustre fits a workload access pattern
  • Deploy performance-tuned gcsfuse mounts on GKE with profile StorageClasses and Workload Identity authentication
  • Design and validate checkpoint write patterns for safety under preemption (rename atomicity, hierarchical namespace)
  • Troubleshoot slow training throughput or high Cloud Storage bills on existing gcsfuse mounts using metrics
  • Enable and interpret gcsfuse metrics (file cache hits, request mix, operation types) to diagnose performance regressions

Quality Notes

  • Excellent: Fit gate enforces clear boundaries — prevents FUSE recommendations for shared mutable writes (correctly routes to Filestore/Lustre) and for workloads that accept gs:// URIs natively (recommends native APIs)
  • Excellent: Security guardrails explicitly documented — 'Never enable kernel-list-cache-ttl-secs: -1 on mutable or checkpointing mounts' with rationale; 'Never present rename-dir-limit as the fix without stating the non-atomicity'
  • Excellent: Staleness trade-off documented with warning block (>[!WARNING]) when infinite TTLs (-1) are recommended for cache tuning
  • Excellent: Attribution mechanism baked into every gcloud command and HTTP call with version-locked telemetry tokens — meets compliance/usage-tracking requirements
  • Excellent: GKE version gates explicitly listed (1.35.1-gke.1616000, 1.33.0-gke.2248000, 1.32.1-gke.1357001) with feature cross-references and decision table routing
  • Excellent: Three reference docs provide deep runbooks for distinct intents (fit gate routing in SKILL.md directs to Checkpoint Safety or GKE Deployment or Diagnosis)
  • Excellent: Complete manifests (KSA, PV, PVC, Job) with annotations (gke-gcsfuse/volumes, gke-gcsfuse/ephemeral-storage-limit) and inline comments explaining each field
  • Excellent: Telemetry-first diagnosis approach — explicitly forbids hypothesizing without metrics, names exact metric keys (file_cache_read_count, gcs_request_count, fs_ops_count), and maps signatures to configs
  • Excellent: Memory budgeting guidance for concurrent shard writers (write: global-max-blocks ≥ N writers) with RAM budget calculations (~96 MiB per streaming file)
  • Good: Cross-project mount guidance (service agent roles, control-plane pre-scan, principal:// binding location) is precise but could benefit from a dedicated troubleshooting section
  • Minor: Performance diagnosis workflow is comprehensive but dense; a summary table mapping metric signatures → root causes → fixes is present and well-structured, but requires re-reading to extract the full decision tree
  • Minor: File rename vs. directory rename semantics (atomic MoveObject v3.2.0+ on flat buckets; atomic RenameFolder on HNS) are clearly stated but could emphasize the MoveObject v3.2.0 API change more prominently in the verdict table
  • Minor: No troubleshooting guide for 'files randomly get ESTALE errors during training' — the skill states 'First to close wins; later writers get ESTALE' but does not provide a runbook for diagnosing which workers are writing the same path
Model: claude-haiku-4-5-20251001Analyzed: Aug 19, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use google/google-cloud-storage-fuse in your dev environment

Command Palette

Search for a command to run...