2

我已经安装了一个桶:

hostname:/ # gcsfuse --implicit-dirs --foreground bucketname /directory
Using mount point: /directory
Opening GCS connection...
WARNING: gcsfuse invoked as root. This will cause all files to be owned by
root. If this is not what you intended, invoke gcsfuse as the user that will
be interacting with the file system.
Opening bucket...
Mounting file system...
File system has been successfully mounted.

然后,在另一个连接中,我运行这个:

hostname:/ # head /directory/subdirectory/file.bak
head: error reading '/directory/subdirectory/file.bak': Input/output error

同时,在使用 gcsfuse 的第一个 shell 上,我看到了这个:

fuse: 2019/06/11 13:23:28.153146 *fuseops.ReadFileOp error: fh.reader.ReadAt: startRead: NewReader: Received unexpected status code 200 instead of HTTP 206

另一方面,树上的目录是完全可遍历的。

编辑:使用 --debug_gcs 我发现了这个:

gcs: 2019/06/11 13:40:17.339999 Req             0x7a: -> ListObjects() (44.661907ms): OK
gcs: 2019/06/11 13:40:17.340263 Req             0x7e: <- ListObjects()
gcs: 2019/06/11 13:40:17.340263 Req             0x7d: <- StatObject("subdirectory/file.bak/")
gcs: 2019/06/11 13:40:17.383932 Req             0x7d: -> StatObject("subdirectory/file.bak/") (43.666095ms): gcs.NotFoundError: googleapi: Error 404: No such object: bucket/subdirectory/file.bak/, notFound
gcs: 2019/06/11 13:40:17.435100 Req             0x7e: -> ListObjects() (94.837769ms): OK
gcs: 2019/06/11 13:40:17.435561 Req             0x7f: <- Read("subdirectory/file.bak", [0, 3698))
gcs: 2019/06/11 13:40:17.471072 Req             0x7f: -> Read("subdirectory/file.bak", [0, 3698)) (35.514446ms): Received unexpected status code 200 instead of HTTP 206
fuse: 2019/06/11 13:40:17.471088 *fuseops.ReadFileOp error: fh.reader.ReadAt: startRead: NewReader: Received unexpected status code 200 instead of HTTP 206

这似乎不是 gcsfuse 中的正常权限错误,而是与--implied-dirs 相关的。有人可以帮忙吗?

4

0 回答 0