Szabolcs
Szabolcs

Reputation: 4106

How to grant Google compute engine instance access to a cloud storage bucket?

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?

Upvotes: 2

Views: 8096

Answers (1)

Szabolcs
Szabolcs

Reputation: 4106

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!

Upvotes: 3

Related Questions