标签:conf max nbsp .json name size idt system default
sudo radosgw-admin metadata get user:tuanzi > user.md.json vi user.md.json #to add ssd-placement { "key": "user:tuanzi", "ver": { "tag": "__gHSAD0K7rEZcQ2m3qT_RWk", "ver": 1 }, "mtime": "2017-02-27 06:48:17.488750Z", "data": { "user_id": "tuanzi", "display_name": "tuanzi", "email": "", "suspended": 0, "max_buckets": 1000, "auid": 0, "subusers": [], "keys": [ { "user": "tuanzi", "access_key": "xxx", "secret_key": "xxx" } ], "swift_keys": [], "caps": [], "op_mask": "read, write, delete", "default_placement": "ssd-placement", "placement_tags": [], "bucket_quota": { "enabled": false, "max_size_kb": -1, "max_objects": -1 }, "user_quota": { "enabled": false, "max_size_kb": -1, "max_objects": -1 }, "temp_url_keys": [], "attrs": [ { "key": "user.rgw.idtag", "val": "" }, { "key": "user.rgw.manifest", "val": "" } ] } } sudo radosgw-admin metadata put user:tuanzi <user.md.json
$ radosgw-admin region get > region.conf.json $ cat region.conf.json { "name": "default", "api_name": "", "is_master": "true", "endpoints": [], "master_zone": "", "zones": [ { "name": "default", "endpoints": [], "log_meta": "false", "log_data": "false"}], "placement_targets": [ { "name": "default-placement", "tags": []}], "default_placement": "default-placement"} #<edit region config, add a new placement target> { "name": "default", "api_name": "", "is_master": "true", "endpoints": [], "master_zone": "", "zones": [ { "name": "default", "endpoints": [], "log_meta": "false", "log_data": "false"}], "placement_targets": [ { "name": "default-placement", "tags": []}, { "name": "ssd-placement", "tags": []}], "default_placement": "default-placement"} $ radosgw-admin region set < region.conf.json
sudo radosgw-admin zone get --rgw-zone=default >zone.json #先创建在SSD设备上的default.rgw.buckets.data.ssd pool vi zone.json # add ssd-placement { "id": "3d240698-79c4-4af0-abab-6b83b340a538", "name": "default", "domain_root": "default.rgw.data.root", "control_pool": "default.rgw.control", "gc_pool": "default.rgw.gc", "log_pool": "default.rgw.log", "intent_log_pool": "default.rgw.intent-log", "usage_log_pool": "default.rgw.usage", "user_keys_pool": "default.rgw.users.keys", "user_email_pool": "default.rgw.users.email", "user_swift_pool": "default.rgw.users.swift", "user_uid_pool": "default.rgw.users.uid", "system_key": { "access_key": "", "secret_key": "" }, "placement_pools": [ { "key": "default-placement", "val": { "index_pool": "default.rgw.buckets.index", "data_pool": "default.rgw.buckets.data", "data_extra_pool": "default.rgw.buckets.non-ec", "index_type": 0 } }, { "key": "ssd-placement", "val": { "index_pool": "default.rgw.buckets.index", "data_pool": "default.rgw.buckets.data.ssd", "data_extra_pool": "default.rgw.buckets.non-ec", "index_type": 0 } } ], "metadata_heap": "default.rgw.meta", "realm_id": "" } sudo radosgw-admin zone set --rgw-zone=default --infile zone.json
设置以上规则后,再创建的bucket 放置规则是新的ssd-placement规则了。
CEPH RGW 设置 user default_placement为ssd-placement,优化100KB-200KB小文件性能,使用户创建的bucket对象放置到 SSD设备上。
标签:conf max nbsp .json name size idt system default
原文地址:http://www.cnblogs.com/bodhitree/p/6692699.html