在 GCE 中使用 rexray 驱动程序挂载 docker 卷失败

Mounting docker volume using rexray driver in GCE fails

我一直在尝试使用 RexRay driver in GCE VM instance following the steps mentioned at http://collabnix.com/building-persistent-storage-solution-with-dellemc-rexray-0-8-docker-17-03-managed-plugin-system-for-cloud-platforms/

创建 docker 卷

这里安装并启用了 rexray 作为 docker 插件。 我停留在卷创建步骤。相同的命令如下:

sudo docker volume create --driver rexray/gcepd --name storage1 --opt=size=32

以下是我在执行命令时收到的错误:

Error response from daemon: create storage1: VolumeDriver.Create: docker-legacy: Create: storage1: failed: error querying for existing volume

在网络上找不到上述错误字符串的任何内容。

我在使用 Container Optimized OS 的 VM 实例中尝试相同的步骤时遇到了同样的错误。

以下是我的设置的更多详细信息:

它对我有用,我能够在我的项目中创建一个卷。 您的实例应该具有读取和写入的存储范围,为此,您需要停止实例并编辑 Cloud API 访问范围 上的详细信息,或者您可以 select 允许完全访问所有 Cloud APIs 并保存。

重启您的实例并通过 SSH 运行 以下命令行后:

$ sudo docker volume create --driver rexray/gcepd --opt size=50 --name test-volume          

容器优化OS有一些限制,内核未启用。