Skip to content

Can the meta and data device of thin pool to be loop back device? #1000

Closed

Description

@huang-jl

I notice that the meta and data device of thin pool has to be a linear dev for now. I test locally on my machine, that directly pass a loop device to dmsetup command to create a thin pool is fine.

I also find a related issure #52 many years ago, but seems without any further updates.

I wonder, at least, if is it possible to use lookback device directly, as meta and data device of thin pool for devicemapper-rs. I doubt whether create a linear device based on loopback device maybe:

  1. Add latency during create? Of course, creating the thin-pool might not be too frequent, so this might not be a big problem.
  2. Performance penalty of creating linear device on loopback device? (I do not test it, but I concern it might be a problem?)

Activity

  1. mulkieran commented on Sep 2, 2025

    @mulkieran
    Member

    I think it should absolutely be possible to do this. Unfortunately, devicemapper-rs ThinPool does not allow it. This is a mistake in the design. If you want to use Rust to build a thinpool on loopbacked devices you can try to use the core functionality of devicemapper-rs, located in the core subdirectory, only. This will require you to construct your own thinpool table from primitive Rust types, but it should work.

    I do not believe that the performance penalty of linear devices on top of loopbacked devices, your simpler alternative, would be very great. It can be no greater than the performance penaly of dm-crypt, which adds a 10% latency, very roughly. It does make your storage stack more complicated, but that might not bother you.

  2. locked and limited conversation to collaborators on Sep 2, 2025
  3. converted this issue into a discussion #1001 on Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions