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>
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>
"--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>
--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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>