ceph osd pool get rbd crush_rule | grep 'crush_rule: '
+ # iec vs si units
+ ceph osd pool set $TEST_POOLGETSET target_max_objects 1K
+ ceph osd pool get $TEST_POOLGETSET target_max_objects | grep 1000
+ for o in target_max_bytes target_size_bytes compression_max_blob_size compression_min_blob_size csum_max_block csum_min_block; do
+ ceph osd pool set $TEST_POOLGETSET $o 1Ki # no i suffix
+ val=$(ceph osd pool get $TEST_POOLGETSET $o --format=json | jq -c ".$o")
+ [[ $val == 1024 ]]
+ ceph osd pool set $TEST_POOLGETSET $o 1M # with i suffix
+ val=$(ceph osd pool get $TEST_POOLGETSET $o --format=json | jq -c ".$o")
+ [[ $val == 1048576 ]]
+ done
+
ceph osd pool get $TEST_POOL_GETSET compression_mode | expect_false grep '.'
ceph osd pool set $TEST_POOL_GETSET compression_mode aggressive
ceph osd pool get $TEST_POOL_GETSET compression_mode | grep 'aggressive'
int64_t uf = 0; // micro-f
cmd_getval(cct, cmdmap, "val", val);
- auto si_options = {"target_max_objects"};
- auto iec_options = {"target_max_bytes", "target_size_bytes"};
+ auto si_options = {
+ "target_max_objects"
+ };
+ auto iec_options = {
+ "target_max_bytes",
+ "target_size_bytes",
+ "compression_max_blob_size",
+ "compression_min_blob_size",
+ "csum_max_block",
+ "csum_min_block",
+ };
if (count(begin(si_options), end(si_options), var)) {
n = strict_si_cast<int64_t>(val.c_str(), &interr);
} else if (count(begin(iec_options), end(iec_options), var)) {