当我尝试在安装在
linux(Ubuntu 15.10)目录上的Google云存储桶中创建目录或文件时,我收到输入/输出错误.
我做的步骤:
>创建了一个名为transfer的用户
>创建一个/ mnt / backups目录并运行chown -R transfer / mnt / backups
>当用户转移时,运行gcsfuse –implicit-dir backup01-bucket
的/ mnt /备份.文件系统已成功安装
>运行mkdir test并获取错误mkdir:无法创建目录测试:输入/输出错误
我错过了什么吗?我要做的是能够将文件ftp到服务器并将它们存储在google storeage存储桶而不是本地存储中.
gcsfuse --implicit-dirs --foreground --debug_gcs --debug_fuse backup01-bucket /mnt/backups
然后运行mkdir / mnt / backups / test作为传输用户.
以下是有关的信息:
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.
注意:如果我在Web控制台中创建目录,我可以看到该目录正常.
解决方法
从调试输出中的Insufficient Permission错误中可以看出,gcsfuse对您的存储桶没有足够的权限.可能它具有只读访问权限.
请务必阅读gcsfuse的credentials文档.特别是,如果您在GCE VM上使用服务帐户,请确保使用存储完全访问范围设置VM.