写入挂载的文件系统时出现OSError输入/输出错误 [英] OSError input/output error when writing to mounted filesystem

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

问题描述

我创建了Google Cloud Storage Bucket,并使用以下方式将其安装到我的VM:
gcsfuse my-bucket /path/to/mount/point
当我键入df -H时,其列为已挂载的文件系统.
我有以下问题:

I have created Google Cloud Storage Bucket and mounted it to my VM using:
gcsfuse my-bucket /path/to/mount/point
When I type df -H its listed as mounted filesystem.
I have the following issue:

如果我使用GCP Web控制台将文件上传到存储桶,则可以从VM中看到文件.但是,如果我尝试创建从VM到已挂载的文件系统mkdir /path/to/mount/point/test的目录,则会显示:

If I upload file to the bucket using the GCP web console I can see it from the VM. If I try to create a directory however from the VM to the mounted file system mkdir /path/to/mount/point/test it says:

mkdir: cannot create directory ‘/path/to/mount/point/test’: Input/output error

推荐答案

我找到了原因.我按照其他人的建议启用了调试选项.谢谢你.不幸的是,日志并没有告诉我太多.幸运的是,我又有一个虚拟机,并在那里进行了测试,并且运行良好(挂载+读取/写入存储桶).我了解它不是存储桶端的权限.通过允许默认访问"创建虚拟机,该虚拟机将存储"设置为只读.我授予读取/写入存储权限.也可以指定允许对所有Cloud API的完全访问权限",尽管最好不要授予所有权限.

I found the cause. I enabled the debug options as others suggested. Thank you. Unfortunately the logs did not tell me much. Fortunately I had one more VM and I tested there and it worked fine (mount + read/write to bucket). I understood its not the permissions on the bucket side. The VM was created with "Allow default access" which gives readonly to "Storage". I granted read/write to store. One can specify also "Allow full access to all Cloud APIs" although its better not to grant all permissions if you do not need them.

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

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