2
votes

I have a compute engine instance (Ubuntu 16.04) and a storage bucket both in the same project.

I want to mount the storage on the compute instance. I found some resources on this page: https://cloud.google.com/storage/docs/gcs-fuse.

I already installed gcsfuse on the instance and created a directory to mount the storage like this:

cd $HOME
mkdir storage

Then I mounted the storage using the gcsfuse command:

gcsfuse storage-bucket storage/

According the gcsfuse output everything looks solid, but when I try to create a test file like:

touch storage/test.txt

I get the following error:

touch: cannot touch 'storage/test.txt': Input/output error

I'm kinda stuck at the moment, what else should I try?

1
Check your scope for the instance to make sure it has Cloud Storage access. You may also need to use a service account to access the bucket, depending on its permissions. - Yuri Grinshteyn
Use the --foreground flag when mounting to get errors printed to stderr. If that's not enough detail, try also --debug_fuse. - jacobsa
I found this issue and this issue that were resolved by explicitly supplying the --key-file parameter when mounting the bucket. Maybe it'll help? - Peter

1 Answers

3
votes

Thanks everyone for the support, meanwhile based on this article I managed to set it up for me:

https://www.assistanz.com/mount-google-cloud-storage-bucket-linux/

Also when I created the instance I set the Access scopes to Allow full acces to all Cloud APIs and now it works like a charm!