Commit Graph

406 Commits

Author SHA1 Message Date
Zac Dover
8df894b753 doc/rbd: remove typo and ill-formed command
Ingest Ilya Dryomov's comments here https://github.com/ceph/ceph/pull/49340/files#r1044365857

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-10 13:20:17 +10:00
colemitchell
7c8617423d
Merge pull request #49342 from zdover23/wip-doc-2022-12-09-rbd-rados-rbd-cmds-removing-a-block-device-semantics
doc/rbd: refine "Removing a Block Device Image"

Reviewed-by: Cole Mitchell <cole.mitchell@gmail.com>
2022-12-09 01:45:28 -05:00
Zac Dover
3a6284a49b doc/rbd: refine "Removing a Block Device Image"
Refine and add unselectable prompts to "Removing a Block Device Image"
in doc/rbd/rados-rbd-cmds.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-09 16:38:46 +10:00
colemitchell
9ccf87c165
Merge pull request #49341 from zdover23/wip-doc-2022-12-09-rbd-rados-rbd-cmds-resizing-a-block-device-image-semantics
doc/rbd: refine "Resizing a Block Device Image"

Reviewed-by: Cole Mitchell <cole.mitchell@gmail.com>
2022-12-09 01:17:17 -05:00
Zac Dover
8fb4edb92d doc/rbd: refine "Restoring a Block Device Image"
Refine and add unselectable prompts to "Restoring a Block Device Image"
in doc/rbd/rados-rbd-cmds.rst.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-09 16:07:19 +10:00
Zac Dover
078bec94d0 doc/rbd: refine "Resizing a Block Device Image"
Refine and add unselectable prompts to "Resizing a Block Device Image"
in doc/rbd/rados/rbd-cmds.rst.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-09 15:19:54 +10:00
colemitchell
19426975b2
Merge pull request #49338 from zdover23/wip-doc-2022-12-09-rbd-rados-rbd-cmds-creating-a-block-device-image-semantics
doc/rbd: refine "Creating a Block Device Image"

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2022-12-08 23:50:23 -05:00
colemitchell
7c1191da75
Merge pull request #49340 from zdover23/wip-doc-2022-12-09-rbd-rados-rbd-cmds-retrieving-image-information-semantics
doc/rbd: refine "Retrieving Image Information"

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2022-12-08 23:50:07 -05:00
Zac Dover
d418037b38 doc/rbd: refine "Retrieving Image Information"
Refine the text and prompts in "Retrieving Image Information" in
doc/rbd/rados-rbd-cmds.rst.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-09 10:45:19 +10:00
Zac Dover
ad3c93535f doc/rbd: refine "Listing Block Device Images"
Refine the text and prompts in "Listing Block Device Images" in
doc/rbd/rados-rbd-cmds.rst.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-09 10:21:47 +10:00
Zac Dover
20b14437d6 doc/rbd: refine "Creating a Block Device Image"
Refine the English and prompts in "Creating a Block Device Image" in
doc/rbd/rados-rbd-cmds.rst.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-09 09:53:14 +10:00
Zac Dover
b6cc04e0bc doc/rbd: refine "Create a Block Device User"
Refine "Create a Block Device User", after suggestions made by Ilya
Dryomov in https://github.com/ceph/ceph/pull/49301#pullrequestreview-1208285685

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-08 10:38:52 +10:00
Zac Dover
987d3163a1 doc/rbd: refine "Create a Block Device Pool"
Refine the "Create a Block Device Pool" section of
doc/rbd/rados-rbd-cmds.rst.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-07 23:14:02 +10:00
Zac Dover
51bc43845f doc/rbd: refine "Create a Block Device User"
Refine "Create a Block Device User" in doc/rbd/rados-rbd-cmds.rst.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-12-07 13:58:20 +10:00
Ilya Dryomov
51d8c526f0 doc/rbd: add clone encryption details and examples
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-04 18:24:06 +01:00
Ilya Dryomov
a27ee2bdf8 rbd, rbd-nbd: make --encryption-format optional
If no --encryption-format specified at all, default to "luks" for each
specified --encryption-passphrase-file.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-04 18:19:19 +01:00
Ilya Dryomov
d642f7804b rbd, rbd-nbd: don't strip trailing newline in passphrase files
One of the stated goals is compatibility with standard LUKS tools,
in particular being able to load encryption on images formatted with
cryptsetup.  cryptsetup doesn't do this and this really interferes
with randomly generated (binary) passphrases.

While at it, open passphrase files as binary -- it communicates the
intent if nothing else on POSIX.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-04 18:19:19 +01:00
Zac Dover
8108c4b0ac doc/rbd: add prompts to iscsi-monitoring.rst
Add unselectable prompts to doc/rbd/iscsi-monitoring.rst.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-11-28 10:11:04 +10:00
Zac Dover
fdb1685f86 doc/rbd: update iSCSI gateway info
Update iSCSI gateway info in the RBD documentation.

https://tracker.ceph.com/issues/58080

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-11-27 06:41:35 +10:00
Ilya Dryomov
fb9491e0ec
Merge pull request #48949 from ktdreyer/doc-windows-drive-letter
doc: display Windows RBD drive letter

Reviewed-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-11-20 11:24:25 +01:00
Zac Dover
3fc21e539d doc/rbd: improve grammar in "immutable object..."
Improve the grammar in the "Immutable Object Cache Daemon" section.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2022-11-20 17:13:20 +10:00
Ken Dreyer
02c2ef8c3b doc: display Windows RBD drive letter
Give the Powershell command that identifies the Windows drive letter
when partitioning a new RBD image.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2022-11-18 16:28:01 -05:00
Ilya Dryomov
9805983bcd doc: note architecture availability for PMEM mode of PWL cache
Fixes: https://tracker.ceph.com/issues/49947
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-10-30 18:10:29 +01:00
Ilya Dryomov
0f93f745c6
Merge pull request #40363 from orozery/rbd-clone-encryption
librbd: add encryption format support for clones (part 1/2)

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-10-25 18:16:33 +02:00
Or Ozeri
1d3de19c40 tools/rbd: add encryption format support for cloned image
This commit adds the encryption format support for cloned images via the RBD cli,
making the child image be encrypted with a key different from it parent,
while keeping the child thinly-provisioned.
Additionally, other APIs are extended to support flattening of such images.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
2022-08-25 18:41:47 +03:00
Malte Janduda
ad86ffb35d doc: virtio discard is supported since kernel 5.0
Signed-off-by: Malte Janduda <mail@janduda.net>
2022-08-22 11:35:38 +02:00
Or Ozeri
9892ead7fc librbd/crypto: allow loading luks format without specifying version
This commits extends rbd API's to allow the user to load encryption
using either LUKS1 or LUKS2 formats, without explicitly specifying which.
Prior, the user had to specify explicitly LUKS1 or LUKS2.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
2022-08-04 10:36:07 +03:00
Josh Soref
8abce157f1 doc: Fix many spelling errors
* administrators
* allocated
* allowed
* approximate
* authenticate
* availability
* average
* behavior
* binaries
* bootstrap
* bootstrapping
* capacity
* cephadm
* clients
* combining
* command
* committed
* comparison
* compiled
* consequences
* continues
* convenience
* cookie
* crypto
* dashboard
* deduplication
* defaults
* delivered
* deployment
* describe
* directory
* documentation
* dynamic
* elimination
* entries
* expectancy
* explicit
* explicitly
* exporter
* github
* hard
* healthcheck
* heartbeat
* heavily
* http
* indices
* infrastructure
* inherit
* layout
* lexically
* likelihood
* logarithmic
* manually
* metadata
* minimization
* minimize
* object
* of
* operation
* opportunities
* overwrite
* prioritized
* recipe
* records
* requirements
* restructured
* running
* scalability
* second
* select
* significant
* specify
* subscription
* supported
* synonym
* throttle
* unpinning
* upgraded
* value
* version
* which
* with

Plus some line wrapping and additional edits...

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-07-02 23:38:18 -04:00
Ilya Dryomov
b6ea8b3a35
Merge pull request #46454 from idryomov/wip-rbd-unlink-newest-snap-at-capacity
librbd: unlink newest mirror snapshot when at capacity, bump capacity

Reviewed-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Reviewed-by: Mykola Golub <mgolub@suse.com>
2022-06-03 11:51:41 +02:00
Ilya Dryomov
ef83c0f347 librbd: unlink newest mirror snapshot when at capacity, bump capacity
CreatePrimaryRequest::unlink_peer() invoked via "rbd mirror image
snapshot" command or via rbd_support mgr module when creating a new
scheduled mirror snapshot at rbd_mirroring_max_mirroring_snapshots
capacity on the primary cluster can race with Replayer::unlink_peer()
invoked by rbd-mirror when finishing syncing an older snapshot on the
secondary cluster.  Consider the following:

   [ primary: primary-snap1, primary-snap2, primary-snap3
     secondary: non-primary-snap1 (complete), non-primary-snap2 (syncing) ]

0. rbd-mirror is syncing snap1..snap2 delta
1. rbd_support creates primary-snap4
2. due to rbd_mirroring_max_mirroring_snapshots == 3, rbd_support picks
   primary-snap3 for unlinking
3. rbd-mirror finishes syncing snap1..snap2 delta and marks
   non-primary-snap2 complete

   [ snap1 (the old base) is no longer needed on either cluster ]

4. rbd-mirror unlinks and removes primary-snap1
5. rbd-mirror removes non-primary-snap1
6. rbd-mirror picks snap2 as the new base
7. rbd-mirror creates non-primary-snap3 and starts syncing snap2..snap3
   delta

   [ primary: primary-snap2, primary-snap3, primary-snap4
     secondary: non-primary-snap2 (complete), non-primary-snap3 (syncing) ]

8. rbd_support unlinks and removes primary-snap3 which is in-use by
   rbd-mirror

If snap trimming on the primary cluster kicks in soon enough, the
secondary image becomes corrupted: rbd-mirror would eventually finish
"syncing" non-primary-snap3 and mark it complete in spite of bogus data
in the HEAD -- the primary cluster OSDs would start returning ENOENT
for snap trimmed objects.  Luckily, rbd-mirror's attempt to pick snap3
as the new base would wedge the replayer with "split-brain detected:
failed to find matching non-primary snapshot in remote image" error.

Before commit a888bff8d00e ("librbd/mirror: tweak which snapshot is
unlinked when at capacity") this could happen pretty much all the time
as it was the second oldest snapshot that was unlinked.  This commit
changed it to be the third oldest snapshot, turning this into a more
narrow but still very much possible to hit race.

Unfortunately this race condition appears to be inherent to the way
snapshot-based mirroring is currently implemented:

a. when mirror snapshots are created on the producer side of the
   snapshot queue, they are already linked
b. mirror snapshots can be concurrently unlinked/removed on both
   sides of the snapshot queue by non-cooperating clients (local
   rbd_mirror_image_create_snapshot() vs remote rbd-mirror)
c. with mirror peer links off the list due to (a), there is no
   existing way for rbd-mirror to persistently mark a snapshot as
   in-use

As a workaround, bump rbd_mirroring_max_mirroring_snapshots to 5 and
always unlink the newest snapshot (i.e. slot 4) instead of the third
oldest snapshot (i.e. slot 2).  Hopefully this gives enough leeway,
as rbd-mirror would need to sync two snapshots (i.e. transition from
syncing 0-1 to 1-2 and then to 2-3) before potentially colliding with
rbd_mirror_image_create_snapshot() on slot 4.

Fixes: https://tracker.ceph.com/issues/55803
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-05-31 15:14:03 +02:00
Ilya Dryomov
dabcac2060 doc/rbd: add mutual CHAP authentication example
Based on https://github.com/ceph/ceph-iscsi/pull/260.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-05-30 13:51:49 +02:00
Ilya Dryomov
29941e306f
Merge pull request #45887 from bluikko/patch-3
doc: replace spaces with underscores in config option names

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-04-23 10:53:31 +02:00
Ville Ojamo
98ac8e1130 doc: replace spaces with underscores in config option names
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
2022-04-23 09:35:27 +02:00
Yin Congmin
644fbc9fcc rbd: add persistent-cache flush command
Add a flush command so that users can manually flush cache.

[ idryomov: error messages, incorporate doc and help.t hunks, drop
  do_persistent_cache_flush() ]

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-04-12 18:42:05 +02:00
Yin Congmin
05bfe10ad9 rbd: rename image-cache invalidate command
Rename command image-cache to persistent-cache. Refactoring the code
of invalidate command.

[ idryomov: error message, incorporate doc and help.t hunks, drop
  do_persistent_cache_invalidate() ]

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-04-12 18:42:05 +02:00
Ilya Dryomov
e996fd8060 rbd: include persistent cache metrics in "rbd status" report
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-04-11 11:33:24 +02:00
Yin Congmin
769f3a06ec librbd/cache/pwl: add basic metrics to ImageCacheState
Add basic metrics to ImageCacheState and persist them, including
allocated_bytes, cached_bytes, dirty_bytes, free_bytes and hit/miss
info.

Leverage periodic_stats() timer to call update_image_cache_state.
In order to avoid outputting too much debug information, the original
statistics output log level is changed to 5.

Switch to json_spirit for encoding because encode_json encodes bool as
"true"/"false" string.

Remove rbd_persistent_cache_log_periodic_stats option because we need
to always update cache state.

[ idryomov: add cached_bytes and hits_partial; report misses and
  miss_bytes instead of respective totals; naming ]

Fixes: https://tracker.ceph.com/issues/50614
Signed-off-by: Yin Congmin <congmin.yin@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-04-11 08:26:47 +02:00
Josh Durgin
e1548ef36a doc/rbd/rbd-config-ref: add more detail on QoS settings
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2022-01-13 11:37:46 -05:00
Josh Durgin
52995842a9 doc/rbd/rbd-config-ref: group QoS options by throttle type
This makes it clearer that there are distinct throttles with the
same groups of settings.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2022-01-11 21:46:37 -05:00
Ilya Dryomov
3b7513e46a
Merge pull request #44157 from CongMinYin/pwl-small-fixes
librbd/cache/pwl: code cleanup and some minor fixes

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-01-06 14:54:31 +01:00
Yin Congmin
1b4f4841bb doc/rbd: change persistent write-back cache to persistent write log cache
The full name of PWL is persistent write log, and the full name of
RWL is replica write log. Change the title to make it consistent
with the name of the feature and better reflect its design.

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
2021-12-31 16:04:19 +08:00
Mara Sophie Grosch
5d872f3a28 doc: add docs for rbd_default_order
Adds documentation how to change default rbd object size. With the
previous option `--order` it was easy to guess the config name for the
default value, with the current option name `--object-size` thats hard
to guess.

Also extends the documentation for rbd_default_order to include
* how object-size is derived from the configured value
* allowed range of the value

In the first version of this commit I also added min and max for this
parameter (12/25, matching the object size range in `man 8
rbd`/Striping/object-size), but this made some tests fail, since some
seem to set values outside this range (and probably are fine since
included for some time already). To have this a doc-change only, I
removed the range.

Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org>
2021-12-27 19:58:56 +01:00
Dimitri Papadopoulos
7677651618
doc,man: typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2021-12-15 12:04:36 +01:00
Deepika Upadhyay
742e6cbd5f
Merge pull request #43764 from gregsfortytwo/wip-rbd-crash-consistency
doc: fix up rbd snapshot docs around crash consistency

Reviewed-by: Mykola Golub <mykola.golub@clyso.com>
Reviewed-by: Sunny Kumar <sunkumar@redhat.com>
2021-11-20 00:29:16 +05:30
Kefu Chai
3f5ff4ca00
Merge pull request #43765 from inspur-wyq/wip-doc-4
doc/rbd/rbd-mirroring.rst: fix typos

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2021-11-02 19:32:41 +08:00
Greg Farnum
1903ce28a9 doc: fix up rbd snapshot docs around crash consistency
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2021-11-01 23:36:47 +00:00
Javier Cacheiro
8d99512e14 doc: data must be a byte string
Data must be a byte string in python 3.

Signed-off-by: Javier Cacheiro <javier.cacheiro.lopez@cesga.es>
2021-10-26 17:14:15 +02:00
Deepika Upadhyay
8a35516294 doc: add iSCSI initiator client configuration section for cephadm
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-10-18 13:21:43 +05:30
Kefu Chai
48c044b618
Merge pull request #43304 from inspur-wyq/wip-doc-3
doc/rbd/rbd-windows.rst: fix typos

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-09-26 21:55:57 +08:00
Madhu Rajanna
4f48612c2c doc/rbd/rbd-kubernetes: add ceph.conf configmap
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-09-24 16:44:46 +02:00