【问题标题】:Input/output error when writing to google cloud storage bucket写入谷歌云存储桶时输入/输出错误
【发布时间】:2016-06-07 18:52:24
【问题描述】:

我在https://console.cloud.google.com/storage/上创建了一个 gcs 存储桶
并使用 gcsfuse 成功安装在实例上, 但是,当我尝试写入已安装的目录时,它会显示输入/输出错误。

fuse_debug: Op 0x00000003        connection.go:395] <- LookUpInode (parent 1, name "test")
gcs: Req              0x1: <- StatObject("test/")
gcs: Req              0x2: <- StatObject("test")
gcs: Req              0x1: -> StatObject("test/") (31.355698ms): gcs.NotFoundError: googleapi: Error 404: Not Found, notFound
gcs: Req              0x2: -> StatObject("test") (51.589538ms): gcs.NotFoundError: googleapi: Error 404: Not Found, notFound
fuse_debug: Op 0x00000003        connection.go:476] -> Error: "no such file or directory"
fuse_debug: Op 0x00000004        connection.go:395] <- MkDir (parent 1, name "test")
gcs: Req              0x3: <- CreateObject("test/")
gcs: Req              0x3: -> CreateObject("test/") (13.513239ms): googleapi: Error 403: Insufficient Permission, insufficientPermissions
fuse_debug: Op 0x00000004        connection.go:476] -> Error: "CreateChildDir: googleapi: Error 403: Insufficient Permission, insufficientPermissions"
fuse: 2016/06/09 02:12:40.128885 *fuseops.MkDirOp error: CreateChildDir: googleapi: Error 403: Insufficient Permission, insufficientPermissions

【问题讨论】:

    标签: google-cloud-storage google-cloud-platform gcsfuse


    【解决方案1】:

    --foreground --debug_fuse 输出显示您正在使用不允许写入存储桶的凭据。它们可能是只读的(StatObject 没有返回 403,并且 gcsfuse 在启动时检查它是否可以列出存储桶)。

    尝试仔细阅读docs about credentials。特别是,如果您在 Google Compute Engine VM 上自动获取凭据,您可能忘记使用 storage-full 范围创建它。

    【讨论】:

      【解决方案2】:

      请使用--foreground(可能还有--debug_fuse)运行gcsfuse,以了解错误发生时的一些指示。

      【讨论】:

      • 我使用了这两个选项,gcsfuse的输出没有错误,只有在我写入新的挂载目录时才会出现输入/输出错误
      • 你确定吗? --debug_fuse 显示对来自内核的每个请求的响应,并应指示哪个操作失败以及错误消息。 (您也应该看到所有成功的操作。)
      • 我附加了所有命令行,没有其他错误信息。
      • 你忘记了--foreground。没有它,stderr 会转到/dev/null
      • 是的,你是对的!使用--foreground,尝试创建目录'test'时,我可以看到有两个错误,404 和403,但我不知道如何解决
      猜你喜欢
      • 2018-07-22
      • 1970-01-01
      • 1970-01-01
      • 2020-01-25
      • 1970-01-01
      • 2019-06-07
      • 2018-04-02
      • 2020-02-27
      • 2021-11-21
      相关资源
      最近更新 更多