Feature #36603

Allow loop device as a LVM backend

Added by Mariusz Strzelecki 8 months ago. Updated 7 months ago.

Target version:
Start date:
Due date:
% Done:


Affected Versions:
Pull request ID:


Loop device usage is a convinient way to deploy small Ceph clusters for development, however ceph-volume lvm create doesn't allow to use them with lsblk probing, throwing as exception Cannot use device (/dev/loopX). The second method of device type recongnition (using python's stat module) works fine.

The patch is already submitted: and works fine in dev environment.


#1 Updated by Alfredo Deza 8 months ago

For small testing/development clusters it is still viable to pre-create the LVs and then pass those onto ceph-volume. Isn't that an option here?

#2 Updated by Mariusz Strzelecki 8 months ago

Hi Alfredo,
to be honest - I'm not sure. To deploy both production and testing clusters I'm using code that executes ceph-deploy, and the manual doesn't cover this method:
I tried all possible combinations parameters passed to ceph-deploy osd create --data <disk> <node>, but every time it fails with the message frmom ceph-volume. But maybe I missed something?

#3 Updated by Alfredo Deza 8 months ago

Ah, yes, ceph-deploy will not help here.

If you create the LVs beforehand (manually, with some other method besides ceph-deploy), you can certainly have an OSD with loop devices (or any other LV backing really).

#4 Updated by Alfredo Deza 7 months ago

  • Status changed from New to Closed

Closing this as it is possible to use loop devices (if the LV is created before hand). We are not going to add functionality in other ceph-volume corners to support them for creation.

#5 Updated by Mariusz Strzelecki 7 months ago

But the second method of checking if device is valid (using `stat` package from python) recognizes loop devices well, so there is inconsistency between these two... The patch is already on github with appropriate unit tests.

Also available in: Atom PDF