Rate This Document
Findability
Accuracy
Completeness
Readability

Failed to Create an OSD

Symptom

An OSD fails to be created, and the following information is displayed:

[ceph4][ERROR ] RuntimeError: command returned non-zero exit status: 1
[ceph_deploy.osd][ERROR ] Failed to execute command: /usr/sbin/ceph-volume --cluster ceph lvm create --bluestore --data /dev/nvme0n1p1
[ceph_deploy][ERROR ] GenericError: Failed to create 1 OSDs

Key Process and Cause Analysis

The LVM on which the OSD depends fails to be created. The Ceph logical volume is not found when the logical volume information is checked by running the lvs command. However, the Ceph logical volume can be found by running the lsblk command. This indicates that the DM mapping of the Ceph logical volume is not cleared.

Conclusion and Solution

Clear the DM mapping of the logical volume.

dmsetup info -C
dmsetup remove [dm_map_name]