{"data":{"slug":"github-google-skills-skills-cloud-google-cloud-storage-fuse-297e13dbe9d7","title":"Mount Google Cloud Storage Buckets for Workloads","summary":"Mount Google Cloud Storage buckets as POSIX file systems using gcsfuse for workloads requiring POSIX semantics, such as training jobs or checkpointing. This includes deploying tuned mounts on GKE, Compute Engine, or Cloud Run, enabling and sizing file caches, tuning mount flags, and diagnosing performance issues with gcsfuse metrics.","url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-google-cloud-storage-fuse-297e13dbe9d7","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-google-skills-skills-cloud-google-cloud-storage-fuse-297e13dbe9d7","markdown_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-google-cloud-storage-fuse-297e13dbe9d7.md","download_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-google-cloud-storage-fuse-297e13dbe9d7\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before using gcsfuse, ensure the workload's access pattern is known. If the reading code can take `gs:\/\/` paths natively, use native reads instead of mounting. For performance diagnosis, enable gcsfuse metrics first. Prefix all `gcloud` commands with the metrics environment variables and set the exact User-Agent header for HTTP calls to Cloud Storage APIs.","instructions":"---\nname: google-cloud-storage-fuse\ndescription: >-\n  Mounts Cloud Storage buckets on Google Cloud as a POSIX file system with\n  Cloud Storage FUSE (gcsfuse). Use when interacting with gcsfuse or Cloud\n  Storage FUSE mounts: decide whether FUSE, native gs:\/\/ reads, or\n  Filestore\/Managed Lustre fits a workload, deploy tuned mounts on GKE,\n  Compute Engine, or Cloud Run, enable and size file, stat, and list caches, tune\n  mount flags (--implicit-dirs) or config files, apply workload profiles, keep\n  ML checkpointing safe (rename atomicity, hierarchical namespace\/HNS, close-time\n  finalization, concurrent writers), or diagnose slow training, low throughput,\n  or bill spikes with gcsfuse metrics. Covers mount semantics, gcsfuse CLI and\n  configs, GKE gcsfuse CSI driver (Workload Identity principal:\/\/ bindings,\n  profile StorageClasses, sidecar sizing), and Cloud Run volume mounts. Don't use\n  for bucket administration without a mount (google-cloud-storage-basics) or\n  POSIX shared file systems (Filestore, Managed Lustre; use gke-storage).\nlicense: Apache-2.0\nmetadata:\n  version: \"1.0.3\"\n  publisher: google\n  tags: \"gcs, gcsfuse, fuse, mount, file-system\"\n  category: Storage\n  support_tier: primary\n---\n\n# Cloud Storage FUSE\n\nCloud Storage FUSE is a POSIX file-system adapter over Cloud Storage on Google\nCloud, operated via the gcsfuse CLI tool. Mounting is a one-line command;\nmounting *well* is not: the default mount is tuned for coherency, not\nperformance (file cache off, 60 s metadata TTL, list cache off), and\nobject-store semantics leak through the file interface (directory renames fail\nor go non-atomic on flat buckets, objects finalize on close, no file locking).\nThis skill covers the three decisions that matter: whether to use FUSE at all,\nhow to tune the mount to the workload, and how to root-cause a mount that is\nslow or expensive. For installation and first-mount basics, see the\ngoogle-cloud-storage-basics skill.\n\n## Attribution\n\nTag every Cloud Storage command you run or provide to the user while using this\nskill, so usage can be attributed. The tag identifies only the skill and its\nversion; it carries no user data.\n\n-   Prefix every `gcloud` invocation, whatever the subcommand, with the metrics\n    environment variables. Set them inline on each command; shell state may not\n    persist between commands:\n\n    ```bash\n    CLOUDSDK_METRICS_ENVIRONMENT=\"gcs-skills gcs-skills\/1.0 (skill:google-cloud-storage-fuse)\" \\\n        gcloud <command> [flags]\n    ```\n\n    Do not use `gcloud config set` for this: it would persist beyond the current\n    task and mislabel unrelated usage.\n\n-   On direct HTTP calls to the Cloud Storage APIs (for example with `curl`),\n    set this exact User-Agent header, verbatim \u2014 the collection pipeline parses\n    the `gcs-skills\/<version>` and `skill:<name>` tokens, so any rewording\n    breaks attribution:\n\n    ```\n    User-Agent: gcs-skills\/1.0 (skill:google-cloud-storage-fuse)\n    ```\n\n## Step 1 \u2014 Fit Gate (always run this first)\n\n**Never produce mount guidance before the fit gate.** A mount is the right\nanswer only for one of the three workload shapes below. If the workload's access\npattern is unknown, ask \u2014 one question about whether the reading code can take\n`gs:\/\/` paths usually settles it.\n\nWorkload signal                                                                                                                                 | Verdict\n:---------------------------------------------------------------------------------------------------------------------------------------------- | :------\nReading library accepts `gs:\/\/` URIs natively \u2014 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.\nShared **mutable** writes with locking semantics \u2014 databases, concurrent in-place editors, anything relying on `flock`\/`fcntl`                  | **Filestore** (NFS, POSIX locking) or **Managed Lustre**, not FUSE. Stop.\nCode or tools hardcoded to POSIX file paths; read-heavy or new-file-write patterns                                                              | **gcsfuse** \u2014 continue to Step 2.\n\nCollect before deciding: whether paths are hardcoded, read pattern (sequential\nvs. random, re-read frequency), write pattern (new files vs. edits vs. directory\nrenames). These same signals drive tuning later \u2014 record the answers.\n\n## Step 2 \u2014 Route by intent\n\nUser intent (prompt shape)                                                               | Go to\n:--------------------------------------------------------------------------------------- | :----\nProvision: \"mount my bucket for X\", \"get training data into my pods\"                     | [GKE Training Deployment](references\/gke-training-deployment.md)\nSafety\/semantics: \"is this write pattern safe?\", \"can multiple writers share the mount?\" | [Checkpoint & Write Safety](references\/checkpoint-safety.md)\nRegression: \"training is slow\", \"the Cloud Storage bill spiked\", \"throughput dropped\"    | [Performance & Cost Diagnosis](references\/performance-diagnosis.md)\n\n**Never diagnose a regression without telemetry.** If gcsfuse metrics are not\nenabled on the mount, enabling them is the first remediation step \u2014 the\ndiagnosis reference starts there.\n\n## Reference Directory\n\n-   [GKE Training Deployment](references\/gke-training-deployment.md): Fit-gated,\n    performance-tuned mounts for training workloads \u2014 GKE CSI version gates,\n    Workload Identity `principal:\/\/` IAM bindings, profile StorageClasses vs.\n    static PVs, file cache sizing on Local SSD, sidecar resource annotations,\n    complete KSA\/PVC\/Job manifests, and the Compute Engine and Cloud Run\n    variants.\n\n-   [Checkpoint & Write Safety](references\/checkpoint-safety.md): Verdicts on\n    write patterns \u2014 file vs. directory rename atomicity on flat vs.\n    hierarchical namespace (HNS) buckets, close-vs-fsync finalization,\n    concurrent-writer (`ESTALE`) semantics, streaming-write memory budgets, HNS\n    migration, and the `aiml-checkpointing` profile.\n\n-   [Performance & Cost Diagnosis](references\/performance-diagnosis.md):\n    Telemetry-first runbook for slow mounts and bill spikes \u2014 enabling and\n    reading gcsfuse metrics, mapping cache-hit and request-mix signatures to\n    misconfigurations, the coherency-tuned defaults, tuned config keys with\n    their staleness caveats, and billing-line (Class A\/B) attribution.\n","use_cases":["Mount a bucket for a machine learning training job on GKE.","Diagnose slow training or high Cloud Storage costs caused by gcsfuse misconfigurations."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/google\/skills\/blob\/e3c591afe426ea585e4c21799e5199d6d47cd1be\/skills\/cloud\/google-cloud-storage-fuse\/SKILL.md","source_commit":"e3c591afe426ea585e4c21799e5199d6d47cd1be","license":"Apache-2.0","version":null,"listing_approved_at":"2026-11-17","created_at":"2026-11-16T18:20:00.000000Z","updated_at":"2026-11-17T15:28:10.000000Z","seo_title":"Mount Google Cloud Storage Buckets for Workloads","seo_description":"Mount Google Cloud Storage buckets as POSIX file systems using gcsfuse for workloads requiring POSIX semantics, such as training jobs or checkpointing. Includes guidance,","seo_keywords":["mount Google Cloud Storage buckets","gcsfuse for machine learning","Cloud Storage performance diagnosis","gcsfuse metrics analysis","mount for training workloads"]}}