Commit Graph

66 Commits

Author SHA1 Message Date
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
Jason Dillaman
4297e3bf8e rbd: Allow CLI to optionally create shared images
Images that are flagged as shared cannot use the RBD
object map nor RBD mirroring features.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 20:01:21 -05:00
Abhishek Lekshmanan
fcbdd2fe9f doc: Fix a typo in the rbd man page
's/specifially/specifically'

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-07-09 10:27:41 +05:30
Dmitry Smirnov
c0806bbdcc doc: mention kernel support for rbd format 2
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2014-07-05 19:27:24 +10:00
Ilya Dryomov
9b7364d245 rbd: expose options available to rbd map
Add a -o / --options option, which would allow users to specify
rbd-specific and generic ceph client and osd options available at
mapping time in a comma separated list (similar to mount(8) mount
options).

Exposed options are:

- fsid=%s
- ip=%s
- share
- noshare
- crc
- nocrc
- osdkeepalive=%d
- osd_idle_ttl=%d
- rw
- ro (equivalent to existing --read-only flag)

The rw/ro < 3.7 kernels compatibility kludge added in commit
fb0f198644 is preserved.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2013-12-27 09:56:24 -08:00
Loic Dachary
8d60cd1ac2 man: Ceph is also an object store
Replace

   Ceph distributed file system

with

   Ceph distributed storage system

to help reduce the idea that Ceph is just a file system.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-10 18:33:05 +01:00
rallred
0de0efa936 RBD Documentation and Example fixes for --image-format
- RBD Documentation, --image-format wrongly specified as --format in examples
 - RBD Documentation, better describe image format, to differentiate from --format

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-18 18:12:38 -08:00
Guangliang Zhao
409aba6ff5 rbd.cc: add readonly option for "rbd map"
The device could only be set to rw(default) when mapping
now. This patch only handle the user space, because the
kernel part has been completed.

Signed-off-by: Guangliang Zhao <guangliang@unitedstack.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-09-30 20:34:53 -07:00
Josh Durgin
ffc8557acd doc: update rbd man page for new options
--no-progress and --allow-shrink were added recently.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-04-29 15:37:06 -07:00
Sage Weil
325a3372cb rbd: include 'diff' command in man page
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:41 -07:00
Sage Weil
64a202a7ad rbd: update man page for import-diff and export-diff
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:41 -07:00
Josh Durgin
8fea6dee76 rbd: add --pretty-format option
This is the same option the rados and radosgw-admin tool use for more
human-readable json/xml.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-16 13:14:49 -08:00
Stratos Psomadakis
84c5d85764 rbd: support plain/json/xml output formatting
This patch renames the --format option to --image-format, for
specifying the RBD image format, and uses --format to specify the
output formatting (to be consistent with the other ceph tools). To
avoid breaking backwards compatibility with existing scripts, rbd will
still accept --format [1|2] for the image format, but will print a
warning message, noting its use is deprecated.

The rbd subcommands that support the new --format option are : ls, info, snap
list, children, showmapped, lock list.

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-16 13:14:48 -08:00
Dan Mick
b7b724299e rbd: update manpage for import/export
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-12-05 18:17:35 -08:00
Dan Mick
3dffa6dd25 rbd: document defaults for rbd bench-write
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-10-22 13:34:23 -07:00
Sage Weil
86b43179d2 rbd: implement bench-write command
We may want to change the command line args around later to make this
more friendly.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-18 16:43:26 -07:00
Sage Weil
ae7271e13f rbd: document stripe unit options on man page
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-15 15:34:03 -07:00
Dan Mick
61b2e4d6ac rbd: use TextTable to implement ls -l
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 15:20:29 -07:00
Josh Durgin
eeaa92c471 rbd: add locking commands
The locker (entity_name_t) will be different each time the rbd
command line tool is run, so 'lock remove' is always breaking a lock.

Fixes: #2556
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-07 18:38:27 -07:00