Commit Graph

84 Commits

Author SHA1 Message Date
Ilya Dryomov
620f5e1455 rbd: expose rbd unmap options
Reuse rbd map -o infrastructure to expose rbd unmap options in
a similar fashion.  Currently it's just one bool option, but we may
need more in the future.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2016-10-07 17:21:15 +02:00
Jason Dillaman
7176b61bad Merge pull request #11313 from ceph/wip-krbd-lock-on-read-option
rbd: recognize lock_on_read option

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-10-05 10:00:29 -04:00
Ilya Dryomov
e857b78965 rbd: recognize lock_on_read option
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2016-10-04 19:50:32 +02:00
Ilya Dryomov
d38dc29ed5 doc: clarify rbd size units
It wasn't clear from the man page that --size defaults to M.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2016-10-04 10:21:36 +02:00
Kefu Chai
f468c73b6b Merge pull request #10619 from chengweiv5/fix-doc
doc: fix rados/configuration/osd-config-ref.rst

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-08-15 23:00:02 +08:00
Chengwei Yang
c8c92f8a2c doc: format 2 now is the default image format
Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
2016-08-12 17:44:16 +08:00
Chengwei Yang
cb2880a165 doc: replace cluster name with cluster-name to avoid confusing
Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
2016-08-12 13:20:04 +08:00
Chengwei Yang
82e928c6a3 doc: fix rbd map format in rbd manpage
Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
2016-08-11 09:19:39 +08:00
Dongsheng Yang
0575a9e872 tools/rbd: introduce an option of --force for snap remove
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
2016-07-26 02:23:30 -04:00
Dongsheng Yang
23a135d2a8 tools/rbd: introduce a simple bench for read
Currently, we have a bench-write for in rbd tool, but we don't have
a simple bench for read.

This patch add a new subcommand of bench, with an option of --io-type.
Then we can do a simple bench for write or read.

Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
2016-06-20 01:24:44 -04:00
Dongsheng Yang
1dd542d8ce tools/rbd: make bench-write invisible to user
rbd bench-write is going to be deprecated. This patch
makes it invisible in help message and manpage. But it
is still working.

Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
2016-06-20 01:24:44 -04:00
Douglas Fuller
653bc453e3 rbd: add methods to set and get snapshot limits
Add a subcommand, rbd snap limit set <image> --limit <integer>, to
limit the number of snapshots that may be made of a given image.
To clear, use rbd snap limit clear <image>. Add an omap
key, 'snap_limit' to the RBD header for implementation. Add object
classes to set and query the limit. Older OSDs will ignore the limit.

Fixes: http://tracker.ceph.com/issues/15706
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2016-06-07 13:44:24 -07:00
luokexue
6d69636ee9 doc: Fixes all "Qemu" to "QEMU"
Signed-off-by: luokexue <luo.kexue@zte.com.cn>
2016-04-16 11:42:19 +08:00
Jason Dillaman
622748ae15 rbd: deprecate image format 1
The rbd cli will warn about the deprecation when attempting to create
image format 1 images.  librbd will log an error message when opening
a format 1 RBD image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-02-29 13:22:32 -05:00
Vikhyat Umrao
71690e707f rbd: add --object-size option
Object size can be specified when creating an image with the --order option,
as a number of bits in the size.

This patch is adding new option --object-size. This new option will specify
object size directly for example --object-size 2M.

It would be easier to use. --order is still present for backwards compatibility.
For simplicity, we are rounding up the object size to the nearest power of 2.

Fixes #12112

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2015-12-08 16:14:03 +05:30
Yunchuan Wen
b0deee4961 Update man page for new rbd nbd command
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
2015-12-02 11:29:41 +08:00
Josh Durgin
46249fe5b2 Merge pull request #6541 from dillaman/wip-11287
librbd: integrate journaling support for IO operations

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-11-17 11:39:51 -08:00
Ilya Dryomov
f2432e01f2 rbd: recognize cephx_sign_messages option
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
2015-11-14 16:39:35 +01:00
Jason Dillaman
750771c6ff librbd: add new RBD_FEATURE_JOURNALING feature code
When enabled, all mutable operations against an RBD image
will be recorded to a journal prior to changing the underlying
RBD image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-11-12 20:17:52 -05:00
Vikhyat Umrao
b30d1b8d00 doc: Adding --cluster option to rbd man page.
Fixes #13457
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-11-10 22:05:59 -08:00
Vikhyat Umrao
cd4ac1cae1 rbd: support size suffixes for size-based options
This patch will provide support for size suffixes for
below given options:

--stripe-unit <size in B/K/M>
--io-size <size in B/K/M/G/T>
--io-total <size in B/K/M/G/T>

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2015-08-06 20:40:51 +05:30
Vikhyat Umrao
85cb86d05f doc: change "--keyfile" description in man page of rbd help
"--keyring" has higher priority than "--keyfile".
"--keyfile" option is overridden by "--keyring"
if latter is also specified.

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2015-08-03 22:57:04 +05:30
Ilya Dryomov
17a3e4b969 rbd: rename --object-extents option to --whole-object
--object-extents is a bit confusing - extent is generally something of
a varying length and here the meaning is "diff whole objects".  Rename
it to --whole-object (the name of diff_iterate() parameter).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
afbf90d5b5 rbd: du command should take spec as an argument
Change du to take <image-spec> | <snap-spec> as an argument instead of
going through --image option.  The new synopsis is

    (du | disk-usage) [<image-spec> | <snap-spec>]

This is to make it look more like the rest of the commands: the only
other command that takes pool as an argument is ls and it can't really
serve as a prototype for du, because the latter has to work on images
and snapshots as well.

Examples:

    # stats for pool rbd
    $ rbd du
    $ rbd -p rbd du

    # stats for pool foo
    $ rbd -p foo du

    # stats for snapshot mysnap of image baz in pool rbd
    $ rbd du baz@mysnap

    # stats for image bar in pool foo
    $ rbd du foo/bar

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
bbc5c71284 rbd: import doesn't require image-spec arg, ditto for export and path
Mark those as such in help and clarify what image-spec defaults to.

Related, all command args in our man page are enclosed into brackets.
I suppose the reason is that they are optional in the sense that you
can have commands like

    $ rbd clone --pool a --image b --snap -c --dest-pool d --dest e

with no args.  Given that we are trying to push people towards

    $ rbd clone a/b@c d/e

undo that so that real optional arguments can be marked optional.
While at it, add synopsis for each command and use backticks for
denoting commands more consistently.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
76989cc4ae doc: use spec syntax in rbd docs
Use spec syntax instead of --pool, --image and --snap to hopefully push
people towards the former.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Vikhyat Umrao
9909388171 rbd: use image-spec and snap-spec in rbd help
This patch changes image-name instances to image-spec and snap-name
instances to snap-spec to try to clarify usage for some commands and
disambiguate the term {image,snap}-name, which has been used to denote
both simple names and compound names (specs).

<image-spec> is [<pool-name>]/<image-name>
<snap-spec> is [<pool-name>]/<image-name>@<snap-name>

This patch also removes duplicate checks for image-name and snap-name.

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
[idryomov@gmail.com: some commands take either image-spec or snap-spec,
other fixes, formatting, changelog]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
89c2a0b58a rbd: recognize queue_depth option
.. and also stress the difference between libceph and rbd mapping
options.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-06 16:32:15 +03:00
Vikhyat Umrao
8e56a5b5c4 [rbd] support G/T units in rbd create/resize
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2015-06-16 23:27:52 +05:30
Ilya Dryomov
52440c4b97 rbd: document mount_timeout in the man page
With "rbd: timeout watch teardown on unmap with mount_timeout" going
into kernel 4.2, document its effect in the man page.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-05-25 15:41:51 +03:00
Jason Dillaman
7ffafc56b1 rbd: add disk usage tool
The new disk usage tool uses the new fast diff object map feature
(when enabled) to quickly calculate the provisioned vs actual usage
of images and associated snapshots within a pool.

Fixes: #7746
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-05-13 10:25:45 -04:00
Jason Dillaman
b556d3173a librbd: add new deep-flatten RBD feature
Copy-on-read/write will now use an empty snapshot context to
deep-copy the object through all existing snapshots.  With the
deep-flatten feature enabled, the flatten operation will now
disconnect a child image from its parent even if it has existing
snapshots.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-05-06 21:51:31 -04:00
Josh Durgin
94a7d11e4a Merge pull request #4186 from ceph/wip-7787
librbd: add fast diff feature

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-29 16:42:03 -07:00
Ilya Dryomov
b1d3f918fb rbd: allow unmapping by spec
Make use of krbd_unmap_by_spec() and allow unmapping by <image-name>
(i.e. pool/image@snap spec) with a bunch of careful adjustments to the
fragile command args/options parsing process to make --pool, --image
and --snap options work as expected for rbd unmap <image-name> case.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-04-19 14:45:37 +03:00
Jason Dillaman
11cc7b2715 rbd: add support for new fast diff feature
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-13 15:24:14 -04:00
Jason Dillaman
eed80f022a rbd: add new --object-extents option to diff / export-diff
The rbd CLI can now use the object map to compute the diffs between
two snapshots.  This option is enabled with the new '--object-extents'
option.

Fixes: #7787
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-12 21:17:33 -04:00
Jason Dillaman
6ce79ab008 rbd: add object map rebuild command
An invalid object map can now be rebuilt via the rbd CLI.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-10 14:10:05 -04:00
Kefu Chai
a0bdf6932b doc: add ":orphan:" field to avoid sphinx warnings
when building man pages from rst files, sphinx complains if any
rst file is not referenced by a doctree.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-04-07 23:26:50 +08:00
Kefu Chai
0e07ccc197 man: move man/8/*.rst back to doc/man/8
sphinx requires that a document tree to be in a single directory,
and the man pages are references by our document. so a simple solution
would be to put all the rst file under a single directory.

Fixes: #11320
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-04-07 23:26:49 +08:00
Kefu Chai
301fe6cbf2 doc: generate man pages in man/Makefile
* move rst files from doc/man/8 into man/8
* extract man_pages setting for sphinx from doc/conf.py to man/conf.py
* generate all man pages in `make install`
* add python-sphinx to Build-Depends
* check for sphinx-build in `configure`
* run changed rst files through sphinx-build in `make check`

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-03-24 12:36:41 +08:00
Kefu Chai
c7826567c0 doc: update .rst file with their .8 counterparts
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-03-23 17:56:33 +08:00
Ilya Dryomov
2769da40d7 rbd: recognize cephx_require_signatures and tcp_nodelay options
Support for these went into 3.19 and 4.0 kernels respectively.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-03-12 14:27:32 +03:00
Sage Weil
faa1f2741c Merge remote-tracking branch 'gh/hammer'
Conflicts:
	src/gmock
2015-03-10 06:24:59 -07:00
Jason Dillaman
6c2d92948c rbd: permit v2 striping for clones and imports
rbd did not previously support specifying striping params
for cloned and imported images.  Extend the behavior to
these other CLI commands.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 18:46:56 -05:00
Florian Haas
14315cf25f doc: trivial: fix missing newlines in rbd man page
As it were, the order, stripe_unit and stripe_count options were
followed by descriptions rendered in the same monospace font as the
options themselves. Insert newlines so they are rendered as regular
text, as was the original intention.

Signed-off-by: Florian Haas <florian@hastexo.com>
2015-02-27 11:21:03 +01:00
Jason Dillaman
0ed296b1e3 rbd: disable RBD exclusive locking by default
Utilize the existing rbd_default_features config option to
control whether or not to enable RBD exclusive locking and
object map features by default.  Also added a new option to
the rbd cli to specify the image features when creating images.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-02-23 10:47:05 -05:00
Yunchuan Wen
4aa9f3f745 man: add rbd status to doc/man/8/rbd.rst
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Reviewed-by: Li Wang <liwang@ubuntukylin.com>
2015-02-02 10:32:23 +01:00
Baptiste Veuillez
008698b37c doc: Change Availability text in all of the man pages
http://tracker.ceph.com/issues/5834 fixes:#5834
signed-off-by: Baptiste Veuillez--Mainard <baptiste.veuillez--mainard@telecom-bretagne.eu>
2015-01-22 03:16:35 +01:00
Josh Durgin
a845139d1f Merge pull request #3292 from kylinstorage/rbd-merge-diff-v2
rbd: merge diff files

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-16 12:08:02 -08:00
Yunchuan Wen
9748655921 man: add help for rbd merge-diff command
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
2015-01-15 02:31:41 +00:00