- rework the unit test to coverage all deactivate/destroy function
- make test item simple and easier to read
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
- Make code path much easier to get device info. (get little bit overhead)
- Let some error rasie the correct execption
- for dmcrypt device, we unmap on the deactivate stage. (consist with activate)
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
- using the deactivate/destroy feature to destroy osd
- test reactivate option when the osd goes deactive
- add check_osd_status to check osd status when osd goes up
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
- modify the behavior to handle dmcrypt/mpath osd
- add some functions to get the information of dmcrypt osd
- fixed the logging format Use `%(filename)s` instead of `%(filename)`
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
- Add some unit test to coverage all destroy/deactivate feature.
- Do some minor modifications on the ceph-diskw
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
- add `--reactivate` option (activate do no-op without reactivate with deactive flag)
- for consistency, make both deactivate and destroy take the device/partition name
- add `--deactivate-by-id` to deactivate and destroy for ease of use
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
- Using `--mark-out` option to mark osd out when
deactivate this osd instead of always mark osd out.
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
Implement deactivate option on ceph-disk.
- stop ceph-osd service if needed (If osd still in osd map, make it out first)
- remove 'ready', 'active', and INIT-specific files
- remove gpt partition type and change partition name (prevent triggered by udev)
- create deactive flag
- umount device and remove mount point
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
This has been shown to be problematic for performance on the
monitor. Note that this takes us from ~170/bytes per onode to
~540/bytes per onode. (The encoded onode_t is 390 bytes, not
including the key name.)
Signed-off-by: Sage Weil <sage@redhat.com>
This significantly reduced CPU utilization on the bigbang scale
testing cluster at CERN. Note that it is already disabled for
leveldb by default (in ceph_mon.cc).
Signed-off-by: Sage Weil <sage@redhat.com>
If $path.wal doesn't exist, create it and symlink it to $path.
Set wal_dir to that. This makes it easy to move the wal content
elsewhere later, or to pre-create the .wal dir.
Signed-off-by: Sage Weil <sage@redhat.com>
This way we can have default settings per-backend. Also note that
this is what we currently do with leveldb on the mon and osd.
Signed-off-by: Sage Weil <sage@redhat.com>
max_write_buffer_number=16
min_write_buffer_number_to_merge=6
This cuts the amount of short-lived WAL data that gets
rewritten by roughly a factor of 6.
Signed-off-by: Sage Weil <sage@redhat.com>
Store a daily loadavg and use as an upper limit on when to allow
scrubs. Also track the 15 minute loadavg and only scrub when the
loadavg is decreasing (i.e. 1m < 15m).
Backports: hammer, infernalis
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
osd_scrub_interval_randomize_ratio works to randomize the shallow scrubs
but doesn't prevent a thundering herd of deep scrubs every osd_deep_scrub_interval.
Add the option osd_deep_scrub_randomize_ratio which defines the rate at which scrubs
will randomly turn into deep scrubs.
Backports: hammer, infernalis
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Signed-off-by: Herve Rousseau <herve.rousseau@cern.ch>