Google Cloud Cookbook by Rui Costa

Google Cloud Cookbook by Rui Costa

Author:Rui Costa
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2021-02-12T00:00:00+00:00


Add an entry to /etc/fstab to mount every time automatically when the VM boots using your UID and GID as well as bucket name:

sudo vim /etc/fstab # insert: my-bucket-4312 /home/dhodun/my-bucket-4312 gcsfuse rw,implicit_dirs,_netdev,allow_other,uid=1002,gid=1003

Restart the VM and test to ensure that the bucket is always mounted at bootup:

sudo shutdown -r now # on restart ls my-bucket-4312

Delete the VM:

gcloud compute instances delete gcs-fuse-vm

Discussion

Gcsfuse is a great convenience tool for mounting and accessing GCS blobs. It is not a production replacement for a traditional file store—for that, consider Filestore—and lacks many features of a true POSIX filesystem as well as some GCS features such as metadata. You might use it to save on cost (Filestore is about 10x the price per gigabyte) or because you are trying to access data that is largely used and generated by systems compatible with GCS and you need a one-off workaround. Take a look at the mounting docs for more info on permissions and security.

Also note that you will still incur GCS storage charges, particularly for nearline and coldline (archival) storage (see FUSE notes).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.