Bug #24795
closedUnclear documentation on preparing devices
0%
Description
This is the doc I have for 13.2.0:
[root@ceph-osd0 /]# ceph-volume lvm prepare Prepare an OSD by assigning an ID and FSID, registering them with the cluster with an ID and FSID, formatting and mounting the volume, and finally by adding all the metadata to the logical volumes using LVM tags, so that it can later be discovered. Once the OSD is ready, an ad-hoc systemd unit will be enabled so that it can later get activated and the OSD daemon can get started. Encryption is supported via dmcrypt and the --dmcrypt flag. Existing logical volume (lv): ceph-volume lvm prepare --data {vg/lv} Existing block device, that will be made a group and logical volume: ceph-volume lvm prepare --data /path/to/device Optionally, can consume db and wal devices or logical volumes: ceph-volume lvm prepare --data {vg/lv} --block.wal {device} --block.db {vg/lv}
Looking at the section "Existing block device, that will be made a group and logical volume:"
So it seems that in a all in one fashion (block/wal/db on the same device) passing a block device to ceph-volume works.
However looking at "Optionally, can consume db and wal devices or logical volumes:", it says it can consume db and wal "devices" which makes me think I can use a device just like in the previous command.
However, it seems that we lost the ability to use a block device for --data because the doc says {vg/lv} (so it's expecting an LV now).
1) Is this intentional?
But I didn't stop here and tried with a block device for --data anyway and here is the result:
[root@ceph-osd0 /]# ceph-volume lvm prepare --data /dev/sdb --block.wal /dev/sdc Running command: /bin/ceph-authtool --gen-print-key Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new 5fafadcf-662a-47cf-9bb4-f1912fa8e33d Running command: /usr/sbin/vgcreate --force --yes ceph-fca417c9-7960-4627-82c9-5954d7d8e7b7 /dev/sdb stdout: Physical volume "/dev/sdb" successfully created. stdout: Volume group "ceph-fca417c9-7960-4627-82c9-5954d7d8e7b7" successfully created Running command: /usr/sbin/lvcreate --yes -l 100%FREE -n osd-block-5fafadcf-662a-47cf-9bb4-f1912fa8e33d ceph-fca417c9-7960-4627-82c9-5954d7d8e7b7 stdout: Logical volume "osd-block-5fafadcf-662a-47cf-9bb4-f1912fa8e33d" created. --> blkid could not detect a PARTUUID for device: /dev/sdc --> Was unable to complete a new OSD, will rollback changes --> OSD will be fully purged from the cluster, because the ID was generated Running command: /bin/ceph osd purge osd.2 --yes-i-really-mean-it stderr: purged osd.2 --> RuntimeError: unable to use device
I would expect based on the doc that the error will be on the --data portion so on /dev/sdb but instead it's on /dev/sdc.
So ceph-volume tells me it cannot find a PARTUUID on /dev/sdc which is normal because there is no partition on /dev/sdc.
So my last question is, should I create a partition? (if so we should clarify the help command) How is this supposed to work?
Thanks.