OSError input/output error when writing to mounted filesystem

本小妞迷上赌 提交于 2019-12-11 14:39:59

问题


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:

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

回答1:


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.




回答2:


Try to use following command,and it will show more information.

gcsfuse --foreground --debug_gcs --debug_http \
        --debug_fuse --debug_invariants \
        --key-file=/src/gcloud_service_account.json \
        my-bucket /path/to/mount/point

You might see such error message

"code": 403, "message": "Access Not Configured. The API (Cloud Storage JSON API) is not enabled for your project. Please use the Google Developers Console to update your configuration."

If so , you need to enable this API for this instance.



来源:https://stackoverflow.com/questions/55382783/oserror-input-output-error-when-writing-to-mounted-filesystem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!