2

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?

Szabolcs
  • 3,990
  • 18
  • 38
  • 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 Dec 07 '17 at 19:10
  • 1
    Use the `--foreground` flag when mounting to get errors printed to stderr. If that's not enough detail, try also `--debug_fuse`. – jacobsa Dec 07 '17 at 22:52
  • 1
    I found [this issue](https://github.com/GoogleCloudPlatform/gcsfuse/issues/190#issuecomment-247928549) and [this issue](https://github.com/GoogleCloudPlatform/gcsfuse/issues/185#issuecomment-243660889) that were resolved by explicitly supplying the `--key-file` parameter when mounting the bucket. Maybe it'll help? – Peter Dec 08 '17 at 18:23

1 Answers1

3

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!

Szabolcs
  • 3,990
  • 18
  • 38