You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在GCE中使用RexRay驱动创建Docker卷失败

Fixing "error querying for existing volume" with RexRay/GCEPD Docker Volumes on GCE

Hey there, let's tackle that frustrating error you're hitting when trying to create a RexRay-backed GCEPD volume with Docker. I've worked through similar headaches with GCE and RexRay, so here are the actionable steps to get this sorted:

1. Double-Check RexRay Plugin Configuration

First up, make sure your RexRay plugin has the correct GCE-specific settings. Even if you installed it via the managed plugin, the default config often misses critical details like your project ID or zone.

  • Run this command to inspect the plugin's current settings:
    docker plugin inspect rexray/gcepd
    
    Look for environment variables like GCE_PROJECT and GCE_ZONE—they need to match your GCE instance's actual project ID and zone (e.g., my-gcp-project and us-central1-a).
  • If they're wrong or missing, reconfigure the plugin with:
    docker plugin disable rexray/gcepd -f
    docker plugin set rexray/gcepd GCE_PROJECT=<your-project-id> GCE_ZONE=<your-instance-zone>
    docker plugin enable rexray/gcepd
    

2. Validate Service Account Permissions

Even though you mentioned the service account has Project Editor access, let's confirm it has the specific permissions RexRay needs to interact with GCE disks:

  • compute.disks.create
  • compute.disks.delete
  • compute.disks.get
  • compute.disks.list
  • compute.zones.get

Project Editor should include these, but sometimes custom IAM roles or organization-wide restrictions can block access. As a quick test, temporarily assign the Compute Admin role to the instance's service account—if the volume creation works, you know it's a permission issue that needs refining.

3. Check Docker-RexRay Compatibility

Your Docker version (18.03.1-ce) is a bit outdated, and RexRay 0.8 (from the tutorial) can have compatibility quirks with older (or newer) Docker releases. Try one of these:

  • Update Docker to a recent stable version (like 20.10.x) since 18.03 is end-of-life and no longer supported.
  • Stick strictly to the RexRay 0.8 version from the tutorial: when reinstalling, use rexray/gcepd:0.8 instead of the latest tag, as newer RexRay versions changed how they handle GCEPD.

4. Verify GCE Disk Existence

The error mentions "querying for existing volume"—RexRay might be struggling to check if a disk named storage1 already exists.

  • Head to your GCE Console, go to Disks, and search for storage1. If it exists (even if it's unused), delete it and try creating the volume again.
  • Note that GCE disk names are case-sensitive and must be lowercase—make sure your volume name storage1 follows this rule.

5. Enable Debug Logs for RexRay

To get to the root of the query failure, turn on debug logging for the RexRay plugin:

docker plugin disable rexray/gcepd -f
docker plugin set rexray/gcepd REXRAY_LOGLEVEL=debug
docker plugin enable rexray/gcepd

Then retry the volume creation command, and check the logs with:

docker plugin logs rexray/gcepd

The logs will show exactly where the query is failing—whether it's an authentication issue, zone mismatch, or something else entirely.

6. Reinstall the RexRay Plugin

Sometimes plugin installations get corrupted. Try removing and reinstalling it cleanly:

docker plugin rm rexray/gcepd -f
docker plugin install rexray/gcepd:0.8 --grant-all-permissions

After reinstalling, reconfigure the project and zone as we did in step 1.


In my experience, this error usually boils down to misconfigured zone/project settings or subtle permission issues that aren't obvious with Project Editor access. Start with steps 1 and 4—they're the quickest to validate and fix most cases.

内容的提问来源于stack exchange,提问作者Avinash

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 08:39:28