ceph-disk: add '[un]suppress-activate <dev>' command

It is often useful to prepare but not activate a device, for example when
preparing a bunch of spare disks.  This marks a device as 'do not
activate' so that it can be prepared without activating.

Fixes: #3255
Signed-off-by: Sage Weil <sage@inktank.com>
cls_rbd: make sure stripe_unit is not larger than object size

Test a few other cases too.

backport: cuttlefish, bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
rbd.py: fix stripe_unit() and stripe_count()

These matched older versions of the functions, but would segfault
using the current versions.

backport: cuttlefish, bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
librbd: make image creation defaults configurable

Programs using older versions of the image creation functions can't
set newer parameters like image format and fancier striping.

Setting these options lets them use all the new functionality without
being patched and recompiled to use e.g. rbd_create3().
This is particularly useful for things like qemu-img, which does not
know how to create format 2 images yet.

Refs: #5067
backport: cuttlefish, bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
mon: clear pg delta after some period

If we have not pg_map updates, the delta doesn't update, and can get stuck
with the velocity right before activity stopped.  This is confusing, and
can cause incorrect health warnings about in-progress recovery.

To fix this, zero the delta if there is no activity for
'mon delta reset interval' seconds.

Fixes: #5077
Signed-off-by: Sage Weil <sage@inktank.com>
librbd/internal.cc: fix resource leak

Call release() on librados::AioCompletion to free storage before
leave the loop or call new again.

CID 1021213 (#1 of 1): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rados_completion" going out of scope leaks
  the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge pull request #296 from dalgaaf/wip-da-CID-1021213

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
mon: add 'compact' command

As in, 'ceph mon tell \* compact'

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
Merge pull request #295 from ceph/wip-5077

Reviewed-by: Joao Luis <joao.luis@inktank.com>
Client: get describe_layout by file handle/path

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: fix typos

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: get stripe_unit/stripe_count/object_size/pool_id by file handle/path

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: get file handle/path layout info

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: get replication factor of a file handle/path

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: get the pool name of a file path

Signed-off-by: Andras Elso <elso.andras@gmail.com>
doc: Minor improvements to Ceph FS landing page.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added another instance term to the glossary.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added more glossary-compliant terms and indexing.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Merge pull request #253 from Elbandi/wip-getlayout

Reviewed-by: Sage Weil <sage@inktank.com>
libcephfs: add ceph_get_pool_name()

Convert an int pool id to a pool name.  Useful for making sense of the
output from ceph_get_*_layout()'s poolid output argument.

Signed-off-by: Sage Weil <sage@inktank.com>