Skip to content

Configure GCS

Configuring a Google Cloud Storage bucket for use with LoonFS.

Create a bucket in your project. (Uniform bucket-level access is recommended.)

Grant the service account Storage Object Admin (roles/storage.objectAdmin) on the bucket. That includes the following required permissions:

PermissionUsed for
storage.objects.getreads and existence checks
storage.objects.createwrites and resumable uploads
storage.objects.deletedeletes and aborting uploads
storage.objects.listlisting a prefix

LoonFS authenticates with a service-account key file:

Terminal window
gcloud iam service-accounts keys create ./loonfs-gcs.json \
--iam-account {service_account_email}
Terminal window
loonfs --no-input profile create gcs production \
--bucket {bucket_name} \
--service-account-key-path ./loonfs-gcs.json
loonfs profile use production

Optional: --key-prefix to scope LoonFS within the bucket.

GCS supports direct GET and direct PUT using CRC32C. It does not support direct multipart as of today. However, clients can still use GCS’s relatively large direct PUT ceiling for large objects.

Browser clients using direct_upload methods must configure bucket CORS for the application origin and returned signed headers.

Terminal window
loonfs maintenance store probe

Google Cloud rate-limits compare-and-swap to roughly one write per second per object.

LoonFS uses native GCS generation preconditions to coordinate metadata updates. This limit can therefore impact maximum commit latency for a busy namespace, and some writes can take up to ~1s before acknowledgement.

See Tradeoffs and Write-ahead log.