From 575e95c554b03b954914bcece23d1067e3f89fb9 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Fri, 3 Sep 2021 15:44:39 -0400 Subject: [PATCH] doc/ceph-volume: add lvm migrate/new-db/new-wal The inital PR was implementing those new commands only adds the man page and not the online documentation. Fixes: https://tracker.ceph.com/issues/51814 Signed-off-by: Dimitri Savineau (cherry picked from commit 22de626220e6145fce8e1fd963802170f099f733) --- doc/ceph-volume/index.rst | 3 +++ doc/ceph-volume/lvm/index.rst | 6 +++++ doc/ceph-volume/lvm/migrate.rst | 47 +++++++++++++++++++++++++++++++++ doc/ceph-volume/lvm/newdb.rst | 11 ++++++++ doc/ceph-volume/lvm/newwal.rst | 11 ++++++++ 5 files changed, 78 insertions(+) create mode 100644 doc/ceph-volume/lvm/migrate.rst create mode 100644 doc/ceph-volume/lvm/newdb.rst create mode 100644 doc/ceph-volume/lvm/newwal.rst diff --git a/doc/ceph-volume/index.rst b/doc/ceph-volume/index.rst index a9c18abb7228c..9271bc2a0e967 100644 --- a/doc/ceph-volume/index.rst +++ b/doc/ceph-volume/index.rst @@ -76,6 +76,9 @@ and ``ceph-disk`` is fully disabled. Encryption is fully supported. lvm/systemd lvm/list lvm/zap + lvm/migrate + lvm/newdb + lvm/newwal simple/index simple/activate simple/scan diff --git a/doc/ceph-volume/lvm/index.rst b/doc/ceph-volume/lvm/index.rst index 9a2191fb51935..962e51a51c685 100644 --- a/doc/ceph-volume/lvm/index.rst +++ b/doc/ceph-volume/lvm/index.rst @@ -15,6 +15,12 @@ Implements the functionality needed to deploy OSDs from the ``lvm`` subcommand: * :ref:`ceph-volume-lvm-list` +* :ref:`ceph-volume-lvm-migrate` + +* :ref:`ceph-volume-lvm-newdb` + +* :ref:`ceph-volume-lvm-newwal` + .. not yet implemented .. * :ref:`ceph-volume-lvm-scan` diff --git a/doc/ceph-volume/lvm/migrate.rst b/doc/ceph-volume/lvm/migrate.rst new file mode 100644 index 0000000000000..983d2e79716b4 --- /dev/null +++ b/doc/ceph-volume/lvm/migrate.rst @@ -0,0 +1,47 @@ +.. _ceph-volume-lvm-migrate: + +``migrate`` +=========== + +Moves BlueFS data from source volume(s) to the target one, source volumes +(except the main, i.e. data or block one) are removed on success. + +LVM volumes are permitted for Target only, both already attached or new one. + +In the latter case it is attached to the OSD replacing one of the source +devices. + +Following replacement rules apply (in the order of precedence, stop +on the first match): + + - if source list has DB volume - target device replaces it. + - if source list has WAL volume - target device replaces it. + - if source list has slow volume only - operation is not permitted, + requires explicit allocation via new-db/new-wal command. + +Moves BlueFS data from main device to LV already attached as DB:: + + ceph-volume lvm migrate --osd-id 1 --osd-fsid --from data --target vgname/db + +Moves BlueFS data from shared main device to LV which will be attached as a +new DB:: + + ceph-volume lvm migrate --osd-id 1 --osd-fsid --from data --target vgname/new_db + +Moves BlueFS data from DB device to new LV, DB is replaced:: + + ceph-volume lvm migrate --osd-id 1 --osd-fsid --from db --target vgname/new_db + +Moves BlueFS data from main and DB devices to new LV, DB is replaced:: + + ceph-volume lvm migrate --osd-id 1 --osd-fsid --from data db --target vgname/new_db + +Moves BlueFS data from main, DB and WAL devices to new LV, WAL is removed and +DB is replaced:: + + ceph-volume lvm migrate --osd-id 1 --osd-fsid --from data db wal --target vgname/new_db + +Moves BlueFS data from main, DB and WAL devices to main device, WAL and DB are +removed:: + + ceph-volume lvm migrate --osd-id 1 --osd-fsid --from db wal --target vgname/data diff --git a/doc/ceph-volume/lvm/newdb.rst b/doc/ceph-volume/lvm/newdb.rst new file mode 100644 index 0000000000000..dcc87fc8a740f --- /dev/null +++ b/doc/ceph-volume/lvm/newdb.rst @@ -0,0 +1,11 @@ +.. _ceph-volume-lvm-newdb: + +``new-db`` +=========== + +Attaches the given logical volume to OSD as a DB. +Logical volume name format is vg/lv. Fails if OSD has already got attached DB. + +Attach vgname/lvname as a DB volume to OSD 1:: + + ceph-volume lvm new-db --osd-id 1 --osd-fsid 55BD4219-16A7-4037-BC20-0F158EFCC83D --target vgname/new_db diff --git a/doc/ceph-volume/lvm/newwal.rst b/doc/ceph-volume/lvm/newwal.rst new file mode 100644 index 0000000000000..05f87fff667b6 --- /dev/null +++ b/doc/ceph-volume/lvm/newwal.rst @@ -0,0 +1,11 @@ +.. _ceph-volume-lvm-newwal: + +``new-wal`` +=========== + +Attaches the given logical volume to the given OSD as a WAL volume. +Logical volume format is vg/lv. Fails if OSD has already got attached DB. + +Attach vgname/lvname as a WAL volume to OSD 1:: + + ceph-volume lvm new-wal --osd-id 1 --osd-fsid 55BD4219-16A7-4037-BC20-0F158EFCC83D --target vgname/new_wal