8.3.6. バケットインデックスの動的リシャーディング
バケットをリシャーディングキューに追加することで、バケットインデックスを動的にリシャーディングできます。リシャーディングされる予定です。リシャードスレッドはバックグラウンドで実行され、スケジュールされたリシャーディングを一度に 1 つずつ実行します。
前提条件
- 稼働中の Red Hat Ceph Storage クラスターがある。
- Ceph Object Gateway が少なくとも 2 つのサイトにインストールされている。
手順
rgw_dynamic_reshardingパラメーターをtrueに設定します。例
[ceph: root@host01 /]# radosgw-admin period getオプション: 次のコマンドを使用して、Ceph 設定をカスタマイズします。
構文
ceph config set client.rgw OPTION VALUEOPTION を次のオプションに置き換えます。
-
rgw_reshard_num_logs: 再シャードログのシャードの数。デフォルト値は16です。 -
rgw_reshard_bucket_lock_duration: リシャード中にバケットのロックの期間。デフォルト値は360秒です。 -
rgw_dynamic_resharding: 動的リシャードを有効または無効にします。デフォルト値はtrueです。 -
rgw_max_objs_per_shard: シャードごとのオブジェクトの最大数。デフォルト値は、シャードごとに100000オブジェクトです。 -
rgw_reshard_thread_interval: 再シャード処理のラウンド間の最大時間。デフォルト値は600秒です。
例
[ceph: root@host01 /]# ceph config set client.rgw rgw_reshard_num_logs 23-
リシャーディングキューにバケットを追加します。
構文
radosgw-admin reshard add --bucket BUCKET --num-shards NUMBER例
[ceph: root@host01 /]# radosgw-admin reshard add --bucket data --num-shards 10リシャーディングキューを一覧表示します。
例
[ceph: root@host01 /]# radosgw-admin reshard listバケットログの世代とシャードを確認します。
例
[ceph: root@host01 /]# radosgw-admin bucket layout --bucket data { "layout": { "resharding": "None", "current_index": { "gen": 1, "layout": { "type": "Normal", "normal": { "num_shards": 23, "hash_type": "Mod" } } }, "logs": [ { "gen": 0, "layout": { "type": "InIndex", "in_index": { "gen": 0, "layout": { "num_shards": 11, "hash_type": "Mod" } } } }, { "gen": 1, "layout": { "type": "InIndex", "in_index": { "gen": 1, "layout": { "num_shards": 23, "hash_type": "Mod" } } } } ] } }バケットの再シャーディングステータスを確認するには、以下のコマンドを実行します。
構文
radosgw-admin reshard status --bucket BUCKET例
[ceph: root@host01 /]# radosgw-admin reshard status --bucket dataリシャーディングキューのエントリーをすぐに処理します。
[ceph: root@host01 /]# radosgw-admin reshard process保留中のバケットのリシャーディングをキャンセルします:
警告保留中 の再シャード操作のみをキャンセルできます。継続中 の再シャード操作をキャンセルしないでください。
構文
radosgw-admin reshard cancel --bucket BUCKET例
[ceph: root@host01 /]# radosgw-admin reshard cancel --bucket data
検証
バケットの再シャーディングステータスを確認するには、以下のコマンドを実行します。
構文
radosgw-admin reshard status --bucket BUCKET例
[ceph: root@host01 /]# radosgw-admin reshard status --bucket data