Project

General

Profile

Feature #36603

Allow loop device as a LVM backend

Added by Mariusz Strzelecki over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

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: https://github.com/ceph/ceph/pull/24765 and works fine in dev environment.

History

#1 Updated by Alfredo Deza over 5 years 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 over 5 years 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: http://docs.ceph.com/docs/mimic/rados/deployment/ceph-deploy-osd/
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 over 5 years 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 over 5 years 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 over 5 years 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.

#6 Updated by Alfredo Deza over 4 years ago

ceph-volume should not concentrate on non-production criteria. Testing, and development on loop devices should be up to the implementer and not the tool to support.

In any case (and I will comment on the PR as well), it is possible to make a loop device be recognized by ceph-volume. In the functional tests, we use nvme tools to create a sparse file and attach it to a loop device and tell the kernel that it is an NVMe device. ceph-volume happily takes that and creates LVs ontop.

Also available in: Atom PDF