From: Zdenek Kabelac <zkabelac@redhat.com>
To: device-mapper development <dm-devel@redhat.com>, doug@easyco.com
Subject: Re: Any device mapper target that stores data in files?
Date: Wed, 19 Aug 2015 09:57:05 +0200 [thread overview]
Message-ID: <55D436D1.10001@redhat.com> (raw)
In-Reply-To: <CAAq2XdpJapPakQJ9zyfso6+OfRMCTUSsLmeainXoDQ72TsLeRA@mail.gmail.com>
Dne 18.8.2015 v 08:45 Thiago Padilha napsal(a):
>
> I need a device mapper target that stores data in files of fixed
> sizes, probably defined when the virtual device is first created. For
> the sake of explanation, lets call this target as "dirdm" and assume
> there's an userspace tool of the same name that can be used to manage
> such virtual devices. Now let's say I have an empty directory "/dirdm"
> and want to create a virtual device with 4k "block size" on top of it:
>
> dirdm create --size 10G --block-size 4k /dirdm
>
> After this command is executed, there's a new file with 4k size at
> /dirdm/0. This file will be used to store the first block of the
> device. Here are the filenames that represent some blocks of this
> virtual device:
Hi
I don't quite follow what you try to invent here - it looks like you play with
the idea of doing 'btrfs' without btrfs.
DM is about devices - as soon as you start to mix 'filesystem-layer' with
'block-layer' you get into troubles you cannot resolve - simply because of the
interacting locking inside kernel is not supported for this use-case.
i.e. for initial playing you could use any file via 'loop' device.
(There is even dm-loop support which however is not upstream since there
is already 'loop' target.)
At the end however you will get into cases you cannot resolve once your
filesystem on DM device will get blocked by underlying filesystem used to hold
backend file for loop device.
For DM - you should stay with pure block devices. Loop over filesystem is good
for 'testing' but it should be avoided as advised way for using any DM device.
For b-tree layered storage please check thin-pool.
Regards
Zdenek
prev parent reply other threads:[~2015-08-19 7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-17 4:55 Any device mapper target that stores data in files? Thiago Padilha
2015-08-17 16:27 ` Doug Dumitru
2015-08-18 6:45 ` Thiago Padilha
2015-08-19 7:57 ` Zdenek Kabelac [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55D436D1.10001@redhat.com \
--to=zkabelac@redhat.com \
--cc=dm-devel@redhat.com \
--cc=doug@easyco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).