User Tools

Site Tools


storage:ibm_cos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
storage:ibm_cos [2021/11/26 16:32]
manu
storage:ibm_cos [2024/07/27 12:37] (current)
manu
Line 74: Line 74:
 ===== Additionnal commands ===== ===== Additionnal commands =====
  
 +To switch to root:
 +<cli prompt='#'>​
 +cos-s03# su
 +root@dcas-cos-s03:​~#​ df -h
 +Filesystem ​                                                                ​Size ​ Used Avail Use% Mounted on
 +udev                                                                        47G     ​0 ​  ​47G ​  0% /dev
 +tmpfs                                                                      9.3G  1.3M  9.3G   1% /run
 +/​dev/​md126p2 ​                                                              ​440G ​ 9.1G  408G   3% /​lib/​live/​mount/​medium
 +...
 +</​cli>​
 +
 +Version
 <cli prompt='#'>​ <cli prompt='#'>​
 cos-s03# version cos-s03# version
Line 82: Line 94:
 </​cli>​ </​cli>​
  
 +Health
 <cli prompt='#'>​ <cli prompt='#'>​
 cos-s03# health state cos-s03# health state
Line 126: Line 139:
   * RTO sensitive workloads   * RTO sensitive workloads
  
 +===== Bucket Object Lock ====
  
 +https://​github.com/​aws/​aws-cli
 +
 +
 +The Curl command didn't work so I used the aws s3 commands. (You need to have it installed for the commands to
 +work)
 +Please follow the steps below:
 +  * Enable Object Lock feature on Manager GUI
 +  * Enable Object Lock configuration on Storage Pool. Click on Configure button on Object Lock section.
 +  * Select Container vaults to enable Object Lock. Versioning enabled on selected Container vaults as well.
 +  * Create bucket and run commands to enable Versioning and Object Lock on the individual bucket.
 +
 +__NOTE__ Enabling Object lock will not affect the existing vaults.
 +
 +The below is an example which I tried in my lab to enable Versioning and then Object Lock. Maybe you can try
 +replicating the same to see if it works.
 +
 +==== create bucket ====
 +
 +<cli prompt='​%'>​
 +% curl -X PUT http://​10.10.64.98:​8337/​container/​testlockbucket -u jeff:​password -d '​{"​storage_location":"​cv1","​service_instance":"​jeff1"​}'​ -H "​Content-Type:​ application/​json"​
 +</​cli>​
 +<​code>​
 +{
 +"​storage_location":"​76c978d7-3e92-7946-11b8-2f8dd0e56865",​
 +"​name":"​testlockbucket",​
 +"​service_instance":"​jeff1",​
 +"​acl":​ {
 +"​jeff1@00000000-0000-0000-0000-000000000002":​["​FULL_CONTROL"​]
 +},
 +"​retention_policy":​ {
 +"​status":"​COMPLIANCE",​
 +"​permanent_retention_enabled":​false
 +},
 +"​hard_quota":​0,​
 +"​time_created":"​2024-06-21T07:​38:​25.146Z",​
 +"​time_updated":"​2024-06-21T07:​38:​25.155Z",​
 +"​versioning_state":"​Disabled",​
 +"​has_replication":"​Not Present"​
 +}
 +</​code>​
 +
 +==== check versioning status ==== 
 +
 +<cli prompt='​%'>​
 +% aws s3api get-bucket-versioning --endpoint-url http://​10.10.64.98 --bucket testlockbucket --profile jeff-lab2
 +</​cli>​
 +
 +==== enable versioning ====
 +
 +<cli prompt='​%'>​
 +% aws s3api put-bucket-versioning --endpoint-url http://​10.10.64.98 --bucket testlockbucket --versioning-configuration
 +</​cli>​
 +<​code>​
 +Status=Enabled --profile jeff-lab2
 +</​code>​
 +<cli prompt='​%'>​
 +% aws s3api get-bucket-versioning --endpoint-url http://​10.10.64.98 --bucket testlockbucket --profile jeff-lab2
 +</​cli>​
 +<​code>​
 +{
 +"​Status":​ "​Enabled"​
 +}
 +</​code>​
 +
 +==== check object lock status ====
 +
 +<cli prompt='​%'>​
 +% aws s3api get-object-lock-configuration --endpoint-url http://​10.10.64.98 --bucket testlockbucket --profile jeff-lab2
 +</​cli>​
 +<​code>​
 +An error occurred (ObjectLockConfigurationNotFoundError) when calling the GetObjectLockConfiguration operation:
 +Object Lock configuration does not exist for this bucket
 +</​code>​
 +
 +==== enable object lock ==== 
 +
 +<cli prompt='​%'>​
 +% aws s3api put-object-lock-configuration --endpoint-url http://​10.10.64.98 --bucket testlockbucket --object-lock-configuration ObjectLockEnabled=Enabled --profile jeff-lab2
 +</​cli>​
 +<cli prompt='​%'>​
 +% aws s3api get-object-lock-configuration --endpoint-url http://​10.10.64.98 --bucket testlockbucket --profile jeff-lab2
 +</​cli>​
 +<​code>​
 +{
 +"​ObjectLockConfiguration":​ {
 +"​ObjectLockEnabled":​ "​Enabled"​
 +}
 +}
 +</​code>​
  
  
  
storage/ibm_cos.1637940778.txt.gz · Last modified: 2021/11/26 16:32 by manu