gcsfuse输入/输出错误 [英] gcsfuse Input/Output error

查看:81
本文介绍了gcsfuse输入/输出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在安装在linux(Ubuntu 15.10)目录上的Google云存储桶中创建目录或文件时,出现输入/输出错误.

I'm getting an Input/Output error when I try and create a directory or file in a google cloud storage bucket mounted on a linux (Ubuntu 15.10) directory.

我已经完成的步骤:

  • 创建了一个名为transfer的用户
  • 创建一个/mnt/backups 目录并运行 chown -R transfer/mnt/backups
  • 作为用户转移,运行 gcsfuse --implicit-dir backup01-bucket/mnt/backups .文件系统成功挂载
  • 运行 mkdir测试并得到错误 mkdir:无法创建目录测试:输入/输出错误
  • Created a user named transfer
  • Created a /mnt/backups directory and ran chown -R transfer /mnt/backups
  • As the user transfer, ran gcsfuse --implicit-dir backup01-bucket /mnt/backups. The file system mounts successfully
  • Run mkdir test and get the error mkdir: cannot create directory test: Input/output error

有什么我想念的吗?我想做的是能够将文件ftp发送到服务器,并将其存储在google存储桶中,而不是本地存储中.

Is there something I missed? What I'm trying to do is be able to ftp files to the server and store them in the google storeage bucket rather than local storage.

更新我修改了命令以获取一些调试信息:

Update I modified the command to get some debug information:

gcsfuse --implicit-dirs --foreground --debug_gcs --debug_fuse backup01-bucket /mnt/backups

然后以 transfer 用户身份运行 mkdir/mnt/backups/test .

下面的错误信息出来了:

The following bedug information came out:

fuse_debug: Op 0x00000060        connection.go:395] <- GetInodeAttributes (inode 1)
fuse_debug: Op 0x00000060        connection.go:474] -> OK
fuse_debug: Op 0x00000061        connection.go:395] <- LookUpInode (parent 1, name "test")
gcs: Req             0x3a: <- StatObject("test/")
gcs: Req             0x3b: <- ListObjects()
gcs: Req             0x3c: <- StatObject("test")
gcs: Req             0x3c: -> StatObject("test") (53.375107ms): gcs.NotFoundError: googleapi: Error 404: Not Found, notFound
gcs: Req             0x3b: -> ListObjects() (59.061271ms): OK
gcs: Req             0x3a: -> StatObject("test/") (71.666112ms): gcs.NotFoundError: googleapi: Error 404: Not Found, notFound
fuse_debug: Op 0x00000061        connection.go:476] -> Error: "no such file or directory"
fuse_debug: Op 0x00000062        connection.go:395] <- MkDir
gcs: Req             0x3d: <- CreateObject("test/")
gcs: Req             0x3d: -> CreateObject("test/") (22.090155ms): googleapi: Error 403: Insufficient Permission, insufficientPermissions
fuse_debug: Op 0x00000062        connection.go:476] -> Error: "CreateChildDir: googleapi: Error 403: Insufficient Permission, insufficientPermissions"
fuse: 2016/04/04 06:51:02.922866 *fuseops.MkDirOp error: CreateChildDir: googleapi: Error 403: Insufficient Permission, insufficientPermissions
2016/04/04 06:51:08.378100 Starting a garbage collection run.
gcs: Req             0x3e: <- ListObjects()
gcs: Req             0x3e: -> ListObjects() (54.901164ms): OK
2016/04/04 06:51:08.433405 Garbage collection succeeded after deleted 0 objects in 55.248203ms.

注意:如果我在网络控制台中创建目录,则可以看到该目录.

Note: If I create a directory in the web console I can see the directory fine.

推荐答案

在调试输出中的 Insufficient Permission 错误中,似乎gcsfuse对存储桶没有足够的权限.可能它具有只读访问权限.

It appears from the Insufficient Permission errors in your debug output that gcsfuse doesn't have sufficient permissions to your bucket. Probably it has read-only access.

请务必阅读凭据文档,gcsfuse.特别是,如果您在GCE VM上使用服务帐户,请确保使用 storage-full 访问范围设置VM.

Be sure to read the credentials documentation for gcsfuse. In particular, if you're using a service account on a GCE VM make sure to set up the VM with the storage-full access scope.

这篇关于gcsfuse输入/输出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆