From: ludo@gnu.org (Ludovic Courtès)
To: guix-devel@gnu.org
Subject: Re: LVM support
Date: Thu, 16 Apr 2015 14:47:52 +0200 [thread overview]
Message-ID: <87twwgxmrr.fsf@gnu.org> (raw)
In-Reply-To: <20150416062401.GD6648@venom> ("Tomáš Čech"'s message of "Thu, 16 Apr 2015 08:24:01 +0200")
Tomáš Čech <sleep_walker@gnu.org> skribis:
> On Wed, Apr 15, 2015 at 02:32:14PM +0200, Ludovic Courtès wrote:
[...]
>>Sorry I’m not really familiar with LVM.
>
> It's implemented using device mapper but instead of mapping one block
> device to another you map one block device to whole group (like
> playground where you can do anything).
What do you mean by “whole group”? A tree under /dev/mapper?
>>Technically, if LVM volumes are mapped devices, the best would be to
>>define a <mapped-device-kind> structure for them, as discussed on IRC
>>(like ‘luks-device-mapping’ in (gnu system).)
>
> I didn't like the idea first because it felt confusing and
> unatural. Words like `mapping' and `source' and `target' are
> misleading. But from programming POV it seems to be the easisest
> approach in the end.
I would think the terms are pretty descriptive, esp. when looking at the
corresponding section of the manual, but I’m biased. ;-)
Now, my understanding of your message is not so much that the terms are
misleading, but rather that the abstraction is bogus (which appears to
be the case based on what you say.)
> On the other hand problem starts with need-for-boot?. Device mapped
> device will be activated during the boot (which is desirable for LVM)
> only if there is filesystem which uses such device and has
> `need-for-boot?' set to #t.
Right. I was hesitant about this approach actually, see 9cb426b8.
> I needed to tweak operating-system-boot-mapped-devices to not filter
> mappings of the new type at all. Now it seems to generate initrd
> capable of booting root filesystem from LVM :)
Nice! Could you post your working version of the patch, just to make
things more concrete?
> The thing is that this design is not nice. I always admired Scheme's
> power in expressing things naturally. mapped-device interface is for
> mapping 1 block device to 1 block device which will contain 1
> filesystem.
Understood. This has nothing to do with Scheme, really. :-)
> Design I'm thinking about would follow file-system structure. For
> device property (I'm not sure if this is proper word in Scheme for
> item of record type) to define functions like `partition' (disk,
> number), `mapped-device' (source, target, type), `logical-volume' (group,
> volume) and whatever would be needed further. You could then express
> your mount in more powerful way like:
>
> (partition "sda" 1)
>
> (mapped-device
> (partition "sda" 2)
> "encrypted_swap"
> luks-mapping-type)
>
> (logical-volume
> "system_group"
> "root")
>
>
> (mapped-device
> (logical-volume "some_group" "some_volume")
> "encrypted data"
> luks-mapping-type)
>
> etc.
I see. Looks good!
Does the volume some_group/some_volume have an associated /dev node or
tree? What does it look like?
Really a detail, but I think "/dev/sda2" or (partition "/dev/sda2") is
enough; no need to abstract it, IMO, since device node name is up to the
user.
> Of course, it would lead to more complicated code to handle such
> configuration, but it would definitely feel more natural.
>
> When other block device type (like iSCSI) would be required, just
> another function (or whatever it is) would be implemented.
Anything special about iSCSI? I would expect iSCSI partitions/disks to
just have block devices as usual, no?
Thank you!
Ludo’.
next prev parent reply other threads:[~2015-04-16 12:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 5:07 LVM support Tomáš Čech
2015-04-15 12:32 ` Ludovic Courtès
2015-04-16 6:24 ` Tomáš Čech
2015-04-16 12:47 ` Ludovic Courtès [this message]
2015-04-17 1:09 ` Tomáš Čech
2015-04-21 15:52 ` Ludovic Courtès
2015-05-01 11:32 ` Tomáš Čech
2015-05-03 19:59 ` Ludovic Courtès
2015-05-07 8:02 ` Tomáš Čech
2015-05-19 10:32 ` Ludovic Courtès
-- strict thread matches above, loose matches on Subject: below --
2018-07-29 15:18 Roadmap for Guix 1.0 Ludovic Courtès
2018-07-30 1:23 ` Pjotr Prins
2018-07-30 9:02 ` Nils Gillmann
2018-07-30 12:47 ` Pierre Neidhardt
2018-08-19 11:06 ` LVM support Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twwgxmrr.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).