@@ -47,25 +47,25 @@ case it looks like:
4747
4848.. prompt :: bash #
4949
50- ceph-volume lvm prepare --bluestore --data vg/lv
50+ ceph-volume lvm prepare --bluestore --data vg/lv
5151
5252A raw device can be specified in the same way:
5353
5454.. prompt :: bash #
5555
56- ceph-volume lvm prepare --bluestore --data /path/to/device
56+ ceph-volume lvm prepare --bluestore --data /path/to/device
5757
5858For enabling :ref: `encryption <ceph-volume-lvm-encryption >`, the ``--dmcrypt `` flag is required:
5959
6060.. prompt :: bash #
6161
62- ceph-volume lvm prepare --bluestore --dmcrypt --data vg/lv
62+ ceph-volume lvm prepare --bluestore --dmcrypt --data vg/lv
6363
6464Starting with Ceph Squid, you can opt for TPM2 token enrollment for the created LUKS2 devices with the ``--with-tpm `` flag:
6565
6666.. prompt :: bash #
6767
68- ceph-volume lvm prepare --bluestore --dmcrypt --with-tpm --data vg/lv
68+ ceph-volume lvm prepare --bluestore --dmcrypt --with-tpm --data vg/lv
6969
7070If a ``block.db `` device or a ``block.wal `` device is needed, it can be
7171specified with ``--block.db `` or ``--block.wal ``. These can be physical
@@ -81,9 +81,14 @@ and are ephemeral.
8181
8282A symlink is created for the ``block `` device, and is optional for ``block.db ``
8383and ``block.wal ``. For a cluster with a default name and an OSD ID of 0, the
84- directory looks like this::
84+ directory looks like this:
85+
86+ .. prompt :: bash #
87+
88+ ls -l /var/lib/ceph/osd/ceph-0
89+
90+ ::
8591
86- # ls -l /var/lib/ceph/osd/ceph-0
8792 lrwxrwxrwx. 1 ceph ceph 93 Oct 20 13:05 block -> /dev/ceph-be2b6fbd-bcf2-4c51-b35d-a35a162a02f0/osd-block-25cf0a05-2bc6-44ef-9137-79d65bd7ad62
8893 lrwxrwxrwx. 1 ceph ceph 93 Oct 20 13:05 block.db -> /dev/sda1
8994 lrwxrwxrwx. 1 ceph ceph 93 Oct 20 13:05 block.wal -> /dev/ceph/osd-wal-0
@@ -187,18 +192,19 @@ To fetch the monmap by using the bootstrap key from the OSD, use this command:
187192
188193.. prompt :: bash #
189194
190- /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring
191- /var/lib/ceph/bootstrap-osd/ceph.keyring mon getmap -o
195+ /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring \
196+ /var/lib/ceph/bootstrap-osd/ceph.keyring mon getmap -o \
192197 /var/lib/ceph/osd/<cluster name>-<osd id>/activate.monmap
193198
194199To populate the OSD directory (which has already been mounted), use this ``ceph-osd `` command:
200+
195201.. prompt :: bash #
196202
197- ceph-osd --cluster ceph --mkfs --mkkey -i <osd id> \ --monmap
203+ ceph-osd --cluster ceph --mkfs --mkkey -i <osd id> --monmap \
198204 /var/lib/ceph/osd/<cluster name>-<osd id>/activate.monmap --osd-data \
199- /var/lib/ceph/osd/<cluster name>-<osd id> --osd-journal
200- /var/lib/ceph/osd/<cluster name>-<osd id>/journal \ --osd-uuid <osd uuid>
201- --keyring /var/lib/ceph/osd/<cluster name>-<osd id>/keyring \ --setuser ceph
205+ /var/lib/ceph/osd/<cluster name>-<osd id> --osd-journal \
206+ /var/lib/ceph/osd/<cluster name>-<osd id>/journal --osd-uuid <osd uuid> \
207+ --keyring /var/lib/ceph/osd/<cluster name>-<osd id>/keyring --setuser ceph \
202208 --setgroup ceph
203209
204210All of the information from the previous steps is used in the above command.
@@ -216,31 +222,46 @@ If using device partitions the only requirement is that they contain the
216222
217223For example, using a new, unformatted drive (``/dev/sdd `` in this case) we can
218224use ``parted `` to create a new partition. First we list the device
219- information::
225+ information:
226+
227+ .. prompt :: bash #
228+
229+ parted --script /dev/sdd print
230+
231+ ::
220232
221- $ parted --script /dev/sdd print
222233 Model: VBOX HARDDISK (scsi)
223234 Disk /dev/sdd: 11.5GB
224235 Sector size (logical/physical): 512B/512B
225236 Disk Flags:
226237
227238This device is not even labeled yet, so we can use ``parted `` to create
228239a ``gpt `` label before we create a partition, and verify again with ``parted
229- print ``::
240+ print ``:
241+
242+ .. prompt :: bash #
243+
244+ parted --script /dev/sdd mklabel gpt
245+ parted --script /dev/sdd print
246+
247+ ::
230248
231- $ parted --script /dev/sdd mklabel gpt
232- $ parted --script /dev/sdd print
233249 Model: VBOX HARDDISK (scsi)
234250 Disk /dev/sdd: 11.5GB
235251 Sector size (logical/physical): 512B/512B
236252 Partition Table: gpt
237253 Disk Flags:
238254
239255Now lets create a single partition, and verify later if ``blkid `` can find
240- a ``PARTUUID `` that is needed by ``ceph-volume ``::
256+ a ``PARTUUID `` that is needed by ``ceph-volume ``:
257+
258+ .. prompt :: bash #
259+
260+ parted --script /dev/sdd mkpart primary 1 100%
261+ blkid /dev/sdd1
262+
263+ ::
241264
242- $ parted --script /dev/sdd mkpart primary 1 100%
243- $ blkid /dev/sdd1
244265 /dev/sdd1: PARTLABEL="primary" PARTUUID="16399d72-1e1f-467d-96ee-6fe371a7d0d4"
245266
246267
@@ -263,9 +284,11 @@ already running there are a few things to take into account:
263284
264285The one time process for an existing OSD, with an ID of 0 and using
265286a ``"ceph" `` cluster name would look like (the following command will **destroy
266- any data ** in the OSD)::
287+ any data ** in the OSD):
288+
289+ .. prompt :: bash #
267290
268- ceph-volume lvm prepare --filestore --osd-id 0 --osd-fsid E3D291C1-E7BF-4984-9794-B60D9FA139CB
291+ ceph-volume lvm prepare --filestore --osd-id 0 --osd-fsid E3D291C1-E7BF-4984-9794-B60D9FA139CB
269292
270293The command line tool will not contact the monitor to generate an OSD ID and
271294will format the LVM device in addition to storing the metadata on it so that it
@@ -278,7 +301,9 @@ Crush device class
278301
279302To set the crush device class for the OSD, use the ``--crush-device-class `` flag.
280303
281- ceph-volume lvm prepare --bluestore --data vg/lv --crush-device-class foo
304+ .. prompt :: bash #
305+
306+ ceph-volume lvm prepare --bluestore --data vg/lv --crush-device-class foo
282307
283308
284309.. _ceph-volume-lvm-multipath :
0 commit comments