GCS Operations
-
In GCS operations are categorized into two
- Class A Opertions: Object adds, bucket add and object listings
- Class B Operations: Object gets, retrieving buckets and object metadata

-
As we change object storage classes the pricing will vary
- Refer storage costs and operation costs

- Refer storage costs and operation costs
-
When we upload some documents/objects into GCS bucket they might be accessed frequently but after some time these documents/objects access frequency will be reduced
-
When the object is accessed frequently we want the storage class to be standard
-
But as objects become infrequently accessible we would like to have the storage class to nearline or coldline where we can save on storage costs
-
The solution for this is to use Object Lifecycle policies
Object Lifecycle policy
- This allows us to specify how long object should exist under same settings in your bucket
- Navigate to storage browser and select the bucket

- We can set the lifecylce rule using json file Refer Here
- Lets build a json file for lifecycle config
{
"lifecycle": {
"rule": [
{
"action" : {
"type": "SetStorageClass",
"storageClass": "NEARLINE"
},
"condition": {
"age" : 90
}
}
]
}
}

Deleting objects using gsutil
- the command would be
gsutil rm gs://bucketname/objectname

- to delete all the objects recursively
gsutil rm -r gs://<bucketname>
- To delete the bucket
gsutil rb gs://bucketname
Managing permissions in the bucket

Mounting gcs using gcsfuse
- Filesystem in Userspace (FUSE), cloudstorage is an opensource FUSE adoption fucntionality provided by GCS
- Refer Here for the installation of gcs fuse on linux system

