【发布时间】:2017-12-07 14:52:24
【问题描述】:
我在同一个项目中有一个计算引擎实例 (Ubuntu 16.04) 和一个存储桶。
我想在计算实例上挂载存储。我在这个页面上找到了一些资源:https://cloud.google.com/storage/docs/gcs-fuse。
我已经在实例上安装了gcsfuse 并创建了一个目录来挂载存储,如下所示:
cd $HOME
mkdir storage
然后我使用gcsfuse 命令安装存储:
gcsfuse storage-bucket storage/
根据gcsfuse 的输出,一切看起来都很可靠,但是当我尝试创建一个测试文件时:
touch storage/test.txt
我收到以下错误:
touch: cannot touch 'storage/test.txt': Input/output error
我现在有点卡住了,我还应该尝试什么?
【问题讨论】:
-
检查您的实例范围以确保它具有 Cloud Storage 访问权限。您可能还需要使用服务帐号来访问存储桶,具体取决于其权限。
-
在安装时使用
--foreground标志将错误打印到stderr。如果这还不够详细,请尝试--debug_fuse。 -
我发现this issue 和this issue 在安装桶时通过显式提供
--key-file参数得到解决。也许会有所帮助?
标签: google-cloud-platform google-cloud-storage google-compute-engine ubuntu-16.04 gcsfuse