0

We can mount Google Cloud Storage Bucket as a disk to an instance using Cloud FUSE. By doing so, we are getting 1 PiB as disk size(bucket). Can anybody help me understand why we are getting 1 PiB specifically? Can we modify this size while mounting? and how to automount this disk(bucket) with overridden permissions, i.e what should be the entry in /etc/fstab. I have changed the default directory permission(755) and file permission(644) to 770 and 666 respectively using -

mount -t gcsfuse -o allow_other -o dir_mode=770 -o file_mode=666 bucketname /path/to/mountpoint/

Thanks in advance.

SKumar
  • 15
  • 1
  • 5

1 Answers1

1

The size is shown as 1 PiB because the size of a GCS bucket is (theoretically) limitless, and a mount-point is required to have a finite size. The only limit is 5TB per object within the bucket.

Reference:

There is a maximum size limit of 5 TB for individual objects stored in Cloud Storage.

https://cloud.google.com/storage/quotas

Regarding your query on mounting via /etc/fstab, the detail you need is readily available within the gcsfuse documentation:

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

https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/mounting.md#mount8-and-fstab-compatibility

Craig Watson
  • 9,575
  • 3
  • 32
  • 47
  • Can I customize this 1 PiB size? Say, If I want to mount 1 TiB of a GCS bucket, is it possible? – SKumar May 02 '18 at 04:37
  • @SKumar why would you want to? – Craig Watson May 02 '18 at 06:10
  • 1
    I want to use google cloud storage bucket as a disk where I can place data directory of Nextcloud. I am aware that instead of storage bucket, persistent disk can be used, but I think storage will be cheaper than disk. If I am able to customize the 1PiB size, I can restrict Nextcloud file server storage size as well as will get a convenient way to bill our customers. – SKumar May 02 '18 at 08:05
  • @SKumar no, it is not possible to change the mount size. I suggest you look into alternative methods, for example file system quotas. – Craig Watson May 02 '18 at 08:22