Search code examples
google-cloud-platformmountfusegcsfuse

OSError input/output error when writing to mounted filesystem


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

Solution

  • 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.