Generated banner for Google Cloud Filestore Log Troubleshooting
Generated logo for Google Cloud Filestore Log Troubleshooting

Google Cloud Filestore Log Troubleshooting

GoogleOfficialPublished by Google

  • Skill
  • Workflow
  • Cloud and DevOps
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Diagnoses and resolves Filestore client mount failures on Google Cloud, permission errors (EACCES), and network timeouts (ETIMEDOUT). Use when an NFS mount hangs or fails from a Compute Engine VM, GKE pod, Cloud Run service, or Vertex AI workload, when `mount.nfs` reports "Connection timed out" or "access denied by server", when checking whether VPC ingress firewall rules or `nfsExportOptions` allow a client IP, or when a previously working Filestore share suddenly stops mounting after an administrative change. Don't use for Cloud Storage (GCS) buckets, Persistent Disk, or Cloud NetApp Volumes, and don't use for Filestore capacity scaling or backup and export-policy auditing.
— the description by Google

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured diagnostic workflow for troubleshooting Google Cloud Filestore mount issues. It helps identify the root causes of common NFS errors like EACCES (permission denied) and ETIMEDOUT (network timeouts) occurring on Compute Engine VMs, GKE pods, Cloud Run, or Vertex AI workloads. The workflow includes steps for verifying VPC ingress firewall rules, inspecting nfsExportOptions, and checking Cloud Audit Logs for recent configuration drift, ensuring a systematic approach to restoring connectivity.

What it does

  • Identifies root causes for NFS mount failures including EACCES and ETIMEDOUT.
  • Evaluates nfsExportOptions to ensure client IP or subnet access is correctly configured.
  • Inspects VPC ingress firewall rules for required NFS ports 2049 and 111.
  • Scans Cloud Audit Logs to detect recent administrative configuration changes.
  • Provides remediation commands for firewall and export ACL updates.
  • Supports GKE-specific troubleshooting by accounting for node-level network architecture.

When to use it

  • When an NFS mount hangs or fails with 'Connection timed out' or 'access denied by server'.
  • After an administrative change causes a previously working Filestore share to stop mounting.
  • When verifying if VPC firewall rules or export ACLs allow access from a specific client IP.
  • When troubleshooting GKE CSI driver mount errors in the kube-system namespace.

Advantages

  • Reduces mean time to resolution for common Filestore connectivity issues.
  • Prevents destructive changes by requiring explicit user confirmation for all remediations.
  • Provides clear, attributed commands for consistent diagnostic execution.
  • Distinguishes between administrative drift and persistent configuration errors.

Usage examples

“My GKE pod cannot mount the Filestore instance 'finance-share' in 'us-central1-a'. It reports ETIMEDOUT.”
The agent will extract the instance details, verify the VPC firewall rules for port 2049, and check if the GKE node subnet is correctly allowlisted.
“Why am I getting EACCES when mounting my Filestore instance from a new VM?”
The agent will inspect the instance's nfsExportOptions to determine if the client VM's IP or subnet is missing from the allowed ranges.

Install

  1. Download the skill as a ZIP:

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

    mkdir -p .agents/skills && unzip google-cloud-filestore-log-troubleshooting.zip -d .agents/skills

Documentation by Google

<!-- disableFinding(LINE_OVER_80) -->

Filestore Log-Based Troubleshooting

Diagnoses, troubleshoots, and remediates Filestore client mount failures, permission errors (EACCES), and network timeouts (ETIMEDOUT) across projects.

Prerequisites & Quick Start

Required IAM roles on target project(s) (and Shared VPC host project if applicable):

  • Read: roles/file.viewer (instance & export ACLs), roles/compute.networkViewer (VPC firewall rules), roles/logging.viewer (Cloud Audit & GKE CSI logs), roles/mcp.toolUser (if using MCP tools).

  • Write (Remediation only): roles/file.editor (export ACL updates), roles/compute.securityAdmin (firewall rule creation).

Authenticate, verify billing/APIs, and configure your environment:

gcloud auth login && gcloud auth application-default login
gcloud billing projects describe {project_id} --format="value(billingEnabled)"
gcloud services enable file.googleapis.com compute.googleapis.com logging.googleapis.com --quiet
gcloud config set project {project_id} && gcloud config set compute/region {region}

Attribution

Prefix every gcloud command provided or executed with the skill metrics environment:

CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-log-troubleshooting)" \
gcloud filestore instances describe ...

On direct REST API calls, append HTTP header: User-Agent: gcs-skills/1.0 (skill:google-cloud-filestore-log-troubleshooting).

Conceptual & Informational Queries (CRITICAL)

For purely conceptual, architectural, or educational questions (e.g., "What causes EACCES on Filestore?", "Why does GKE Node IP appear instead of Pod IP?", "What ports does Filestore require?", "Explain root squash"):

  • Rule: Answer immediately using pre-trained knowledge and the workflow rules below. Answering directly minimizes tool latency and token usage when the user only seeks architectural guidance.

  • Constraint: Do not execute external tool calls or API requests for basic knowledge questions.

Handling "No-Command" Constraints (CRITICAL)

If the user prompt contains constraints like "Do not execute commands", "without executing", or "read-only":

  • Rule: Strictly avoid calling run_command to execute any shell, Python, or gcloud commands.

  • Discovery:

    1. First, check if Filestore MCP tools (get_instance, list_instances) are available and use them (API calls, not command executions).

    2. If MCP tools are unavailable, read references/mock-fleet-data.md only if the requested instance matches one of the evaluation scenarios (finance-share, shared-nfs, ml-data, data-hub, prod-share). Never report mock data as live production state. If the instance is not listed there, state that live access is required and provide the exact commands for the user to run.

    3. Fast-Path Stop Rule: Once you locate the target instance in references/mock-fleet-data.md, stop reading additional files immediately and formulate your response. Do NOT read scripts/quick_diagnose.py, scripts/diagnose_lib.py, _internal/quick_diagnose_test.py, or EVAL.* files when command execution is disabled, as inspecting code/test files wastes turns and triggers timeouts.

    4. Explain the required diagnostic steps and output the exact attributed commands for manual execution.

  • Mandatory User Confirmation Requirement: Even when command execution is disabled or the user asks only for recommendations, your response MUST STILL end with a clear question prompting the user for explicit confirmation before applying any remediation (e.g., "Would you like me to proceed with creating the VPC ingress firewall rule [rule_name]? Please confirm to proceed.").

Multi-Runtime Execution Options

# Single instance diagnosis
python3 scripts/quick_diagnose.py --instance="<INSTANCE_ID>" --location="<LOCATION_OR_ZONE>" \
    [--project="<PROJECT_ID>"] [--client-ip="<CLIENT_IP>"] [--client-subnet="<CLIENT_SUBNET_CIDR>"]

# Bulk project-wide fleet diagnosis
python3 scripts/quick_diagnose.py --all --project="<PROJECT_ID>" [--json]
FlagPurpose
--instance, --locationFilestore instance ID and region/zone (--zone is a legacy alias). Required unless --all.
--projectGCP project ID (defaults to active gcloud project).
--client-ip / --client-subnetClient IP or CIDR to evaluate against export ACLs and ingress firewall rules.
--jsonEmit machine-readable JSON on stdout (narrative report goes to stderr).
--apply-fixExecute generated remediation commands. Only pass after explicit user confirmation.
Option 2: Filestore MCP Tools / REST API / gcloud CLI
  • MCP Tools: Call get_instance(name='projects/{project_id}/locations/{location}/instances/{instance_id}') and inspect fileShares[0].nfsExportOptions and networks[0].network.

  • Native REST API (call_gcp_api): Invoke service="file", version="v1", resource_path="projects/{project_id}/locations/{location}/instances/{instance_id}".

  • Standard gcloud:

    CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-log-troubleshooting)" \
    gcloud filestore instances describe {instance_id} --location={location} --project={project_id} --format=json

Core Operational Workflow

Step 1: Parameter Extraction & GKE Node Architecture
  • Extract instance, location (region/zone), project, and client_ip / client_subnet. If target parameters are missing, list instances or ask the user to confirm.

  • GKE Architecture Rule: PersistentVolumes are mounted by the Linux kernel on the GKE Worker Node, not inside the Pod network namespace. Even if Pod IPs (10.4.0.0/14) are allowlisted, the NFS server sees traffic originating from the GKE Node Internal IP. Always evaluate and allowlist the GKE Node Subnet CIDR in nfsExportOptions and VPC firewall rules.

Step 2: Instance Metadata & Shared VPC Resolution
  1. Verify instance state is READY (report state blocker if CREATING, DELETING, or ERROR).

  2. Extract primary Filestore IP (networks[0].ipAddresses[0]) and VPC network URI.

  3. If networks[0].network references projects/{host_project}/global/networks/{network}, resolve {host_project} as the Shared VPC host project for firewall queries.

Step 3: Export ACL Evaluation (EACCES vs EROFS)
  1. Inspect fileShares[0].nfsExportOptions (if empty, default 0.0.0.0/0 READ_WRITE NO_ROOT_SQUASH applies).

  2. EACCES (Permission Denied by Server): Triggered when the client IP or subnet CIDR is not covered by any ipRanges entry.

    • Remediation: Non-destructively append the client IP/subnet CIDR to nfsExportOptions, preserving all existing export rules to avoid breaking active mounts.

  3. EROFS (Read-only file system): Triggered when accessMode is READ_ONLY but client writes are attempted.

Step 4: VPC Ingress Firewall Inspection (ETIMEDOUT)
  1. Query ingress firewall rules in the VPC network (in the host project if Shared VPC).

  2. ETIMEDOUT (Connection Timed Out): Triggered when priority-sorted ingress rules block or fail to allow TCP port 2049 (NFS) and TCP/UDP port 111 (rpcbind) from the client CIDR.

    • Remediation: Create an ingress firewall rule (ALLOW tcp:2049,udp:2049,tcp:111,udp:111) from the client subnet CIDR.

Step 5: Cloud Audit Logs & Configuration Drift Scanning

Query Cloud Audit Admin Activity logs (file.googleapis.com) over the past 24 hours to check if an UpdateInstance operation modified export ACLs or networks:

CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-log-troubleshooting)" \
gcloud logging read 'logName="projects/{project_id}/logs/cloudaudit.googleapis.com%2Factivity" AND protoPayload.serviceName="file.googleapis.com" AND protoPayload.resourceName=~".*{instance}.*"' \
    --project="{project_id}" --freshness="1d" --limit=5 --format="json"
  • Scope to Admin Activity: Always include cloudaudit.googleapis.com%2Factivity in logName so read-only GetInstance/ListInstances calls (data_access) are not falsely flagged as administrative drift.

  • Drift is Informational: Recent UpdateInstance events explain when and by whom (principalEmail, timestamp) configuration changed, but only a failed export ACL or firewall check constitutes a mount blocker.

  • Single Bulk Query Rule: When scanning multiple instances (--all), issue a single project-wide audit log query rather than per-instance queries in a loop.

  • GKE CSI Driver Logs: Optionally inspect resource.labels.container_name="gcp-filestore-driver" (severity>=ERROR) for client-side mount errors.


Output Format & Mandatory Confirmation Gate

Every diagnostic report MUST include a structured summary table and root cause analysis:

### Filestore Diagnostic Report: `[instance-name]`

| Parameter | Value |
| :--- | :--- |
| **Instance ID** | `[instance-name]` (`[location]`, Tier: `[tier]`, State: `READY`) |
| **Filestore IP & Network** | `[filestore-ip]` on VPC `[network-name]` (Host Project: `[host-project]`) |
| **Port 2049 & Export ACL** | Port 2049: `OPEN / BLOCKED` \| Export ACL: `PASS / REJECTED` |
| **Diagnostic Verdict** | **HEALTHY** or **BLOCKED: [Root Cause]** |

#### Root Cause Analysis & Recommended Remediation
- [Explanation of ETIMEDOUT (missing firewall rule on port 2049) vs EACCES (missing export ACL rule) and any recent UpdateInstance audit drift]

```bash
CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-log-troubleshooting)" \
gcloud compute firewall-rules create ...
```
Interactive Remediation Confirmation Gate (MANDATORY)
  • NEVER execute write or remediation commands without explicit user confirmation.

  • Always conclude your response with an explicit confirmation question:

    "Would you like me to proceed with executing this remediation command for you? Please confirm to proceed."

References & Bundled Scripts

Files

references/mock-fleet-data.md

<!-- disableFinding(LINE_OVER_80) -->

<!-- disableFinding(LIST_NO_LINE) -->

Mock Fleet Definitions for Read-Only & Evaluation Runs

This reference provides deterministic mock data for evaluating troubleshooting workflows when command execution or live GCP API access is disabled (e.g., in automated evaluation suites, AutoCloud, or read-only customer environments).

These instances are fictional. Use this data only when the user's request names one of the scenarios below and live access is unavailable. Never present these values as the live state of a real deployment, and never mix them into a report about a real instance. If the user's instance is not listed here, say that live access is required and give the commands to run instead — reporting invented IPs, export rules, or firewall state as real would send an operator to change the wrong production resource.

Table of Contents

  • Scenario 1: Missing Firewall Ingress Rule (ETIMEDOUT): Lines 37-63

  • Scenario 2: Export ACL Mismatch (EACCES): Lines 67-90

  • Scenario 3: Administrative Configuration Drift (Cloud Audit Logs): Lines 94-107

  • Scenario 4: GKE Pod CIDR vs Node Subnet Confusion: Lines 111-119

  • Scenario 5: Interactive Remediation Gate (data-hub Port 2049 Blocked): Lines 123-148

  • Scenario 6: Read-Only Diagnostic Compliance (prod-share): Lines 152-162


Mock Scenarios

Scenario 1: Missing Firewall Ingress Rule (ETIMEDOUT)
  • Project: analytics-prod

  • Instance: finance-share (Location: us-central1-b)

  • Tier: BASIC_HDD

  • Filestore IP: 10.0.3.2

  • VPC Network: prod-vpc

  • Client Context: GKE cluster cluster-east, Worker Node Subnet 10.128.0.0/20

  • Export ACL: Default 0.0.0.0/0 (READ_WRITE, NO_ROOT_SQUASH)

  • VPC Firewall Status: No active ingress firewall rule allows TCP port 2049 or 111 from 10.128.0.0/20

  • Diagnostic Verdict: ETIMEDOUT due to missing VPC ingress firewall rule on TCP port 2049.

  • Remediation Command:

    CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-log-troubleshooting)" \
    gcloud compute firewall-rules create allow-prod-vpc-filestore-nfs \
        --network="prod-vpc" \
        --direction=INGRESS \
        --priority=1000 \
        --action=ALLOW \
        --rules=tcp:2049,udp:2049,tcp:111,udp:111 \
        --source-ranges="10.128.0.0/20" \
        --project="analytics-prod"

Scenario 2: Export ACL Mismatch (EACCES)
  • Project: ai-platform

  • Instance: shared-nfs (Location: us-central1-a)

  • Tier: BASIC_SSD

  • Filestore IP: 10.10.0.5

  • VPC Network: ai-vpc

  • Client VM: worker-01 (Internal IP: 10.128.0.5)

  • Existing nfsExportOptions:

    [
      {
        "ipRanges": ["10.200.0.0/24"],
        "accessMode": "READ_WRITE",
        "squashMode": "NO_ROOT_SQUASH"
      }
    ]
  • VPC Firewall Status: Ingress port 2049 is open to all internal subnets.

  • Diagnostic Verdict: EACCES (Permission Denied by Server). Client IP 10.128.0.5 is not in allowed IP ranges.

  • Remediation Action: Non-destructively append 10.128.0.0/20 (or 10.128.0.5/32) to nfsExportOptions.


Scenario 3: Administrative Configuration Drift (Cloud Audit Logs)
  • Project: media-prod

  • Instance: ml-data (Location: us-east4-a)

  • Incident: Workload stopped mounting today.

  • Cloud Audit Log Record:

    • Timestamp: 2026-09-10T18:42:10Z

    • Principal: [email protected]

    • Service: file.googleapis.com

    • Method: google.cloud.filestore.v1.Filestore.UpdateInstance

    • Updated Fields: fileShares.nfsExportOptions

  • Diagnostic Verdict: Configuration drift. An administrative update by [email protected] 4 hours ago modified nfsExportOptions, removing the previous client CIDR.


Scenario 4: GKE Pod CIDR vs Node Subnet Confusion
  • Client Symptom: Pods in GKE cluster ml-cluster cannot mount Filestore despite the Pod CIDR 10.4.0.0/14 being added to nfsExportOptions.

  • Architectural Reality: Kubernetes mounts execute in the host node network namespace. The source IP arriving at the Filestore server is the Node Internal IP (e.g. 10.128.0.12), which falls outside 10.4.0.0/14.

  • Diagnostic Verdict: Misconfigured export allowlist. The GKE Node Subnet CIDR (e.g. 10.128.0.0/20) must be allowlisted instead of the Pod CIDR.


Scenario 5: Interactive Remediation Gate (data-hub Port 2049 Blocked)
  • Project: analytics-prod

  • Instance: data-hub (Location: us-central1)

  • Tier: REGIONAL

  • Filestore IP: 10.20.0.2

  • VPC Network: prod-vpc

  • Client Context: Subnet 10.128.0.0/20

  • VPC Firewall Status: Port 2049 is blocked by missing ingress firewall rule on prod-vpc.

  • Diagnostic Verdict: ETIMEDOUT on TCP port 2049.

  • Remediation Command:

    CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-log-troubleshooting)" \
    gcloud compute firewall-rules create allow-data-hub-nfs \
        --network="prod-vpc" \
        --direction=INGRESS \
        --priority=1000 \
        --action=ALLOW \
        --rules=tcp:2049,udp:2049,tcp:111,udp:111 \
        --source-ranges="10.128.0.0/20" \
        --project="analytics-prod"
  • Mandatory Gate: Must present the command and ask: "Would you like me to proceed with creating this firewall rule? Please confirm (Yes/No)."


Scenario 6: Read-Only Diagnostic Compliance (prod-share)
  • Project: analytics-prod

  • Instance: prod-share (Location: us-central1-b)

  • Tier: BASIC_SSD

  • Filestore IP: 10.0.4.2

  • VPC Network: prod-vpc

  • Export ACL: Default 0.0.0.0/0 (READ_WRITE)

  • VPC Firewall Status: Allowed on TCP port 2049 via allow-internal-nfs

  • Diagnostic Verdict: Healthy and reachable; manual diagnostic verification commands provided without executing any shell tools.

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.

Needs: Needs a command-line tool, Needs Python

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

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-filestore-log-troubleshooting · 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-filestore-log-troubleshooting.zip