Mounting google storage bucket folder using gcsfuse

gcsfuse

0
down vote
favorite

I am not able to mount a specific folder inside the google storage bucket

On OS X, this program allows you to mount buckets using the mount command. (On Linux, only root can do this.)

mount -t gcsfuse -o rw,user my-bucket /path/to/mount/point

On both OS X and Linux, you can also add entries to your /etc/fstab file like the following:

my-bucket /mount/point gcsfuse rw,noauto,user

Can somebody help me?

my-bucket:foldername /mount/point gcsfuse rw,noauto,user

This doesn't work for me


Thanks for your reply. We mounted the bucket first using the above doucment

and later created a symbolic link to the mounted folder which makes it work

ln -s /mnt/s3/subfolderinsidebucket /your path

and in /etc/fstab

my-bucket /mount/point gcsfuse rw,noauto,user

And again we faced a problem when the server restarted its not able to mount automatically

So we added an entry in crontab @reboot mount.sh
and added the mount command inside the sh file

Best Answer

Follow this doc- https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/mounting.md

You have to add this in /etc/fstab: my-bucket /mount/point gcsfuse rw,noauto,user

after you can run mount /mount/point as a non-root user.

obs: the noauto option above specifies that the file system should not be mounted at boot time.

I don't know if you can mount a specific folder in the bucket, but you can try my-bucket/foldername /mount/point gcsfuse rw,noauto,user (change ":" by "/")

Related Topic