User Tools

Site Tools


ceph:quota_management

Quota Management

Documentation
Name: Quota Management
Description: howto manage quota system
Modification date :13/06/2019
Owner:dodger@ciberterminal.net
Notify changes to:Owner
Tags:ceph, object storage

Official documentation

  • The best documentation is provided by redhat.
  • And official from ceph

Variables used in this documentation

Name Description Sample
${QUOTASCOPE} Scope of the quota (bucket or user)
export QUOTASCOPE="bucket|user"
${THEUSERNAME} The username to be created
export THEUSERNAME="newuser"

WARNING: User quota :WARNING

I've found that USER quota does not works as usual, seems to have a little delay between quota_exceeded→free_space→free_quota while bucket quota is inmediate!!
So use bucket quota instead of user quota.

Also my tests indicate that USER+BUCKET quota WORKS FINE So you can combine user+bucket quota.

Admin commands for quotas

User quota

export QUOTASCOPE="user"

Bucket quota

export QUOTASCOPE="bucket"

Enable quota

MANDATORY if you want to use quotas.

sudo radosgw-admin quota enable --quota-scope=${QUOTASCOPE} --uid=${THEUSERNAME}

Disable quota

sudo radosgw-admin quota disable --quota-scope=${QUOTASCOPE} --uid=${THEUSERNAME}

Seting quota by

Size

sudo radosgw-admin quota set --quota-scope=${QUOTASCOPE} --uid=${THEUSERNAME} --max-size=500G

Size can have B/K/M/G/T suffix.

Number of objects

sudo radosgw-admin quota set --quota-scope=${QUOTASCOPE} --uid=${THEUSERNAME} --max-objets=100000

Quota usage report

sudo radosgw-admin user stats --uid=${THEUSERNAME}

Quota exceeded

<?xml version="1.0" encoding="UTF-8"?><Error><Code>QuotaExceeded</Code><BucketName>testbucket</BucketName><RequestId>tx00000000000000000000d-005d0383e4-6b83-default</RequestId><HostId>6b83-default-default</HostId></Error>
ceph/quota_management.txt · Last modified: 2019/07/18 09:17 (external edit)