From: ludo@gnu.org (Ludovic Courtès)
To: guix-devel@gnu.org
Subject: Re: LVM support
Date: Sun, 03 May 2015 21:59:53 +0200 [thread overview]
Message-ID: <8761891lfq.fsf@gnu.org> (raw)
In-Reply-To: <20150501113230.GA1818@venom> ("Tomáš Čech"'s message of "Fri, 1 May 2015 13:32:30 +0200")
Sorry for the delay.
Tomáš Čech <sleep_walker@gnu.org> skribis:
> On Tue, Apr 21, 2015 at 05:52:33PM +0200, Ludovic Courtès wrote:
[...]
>>So I would declare
>>
>> (mapped-device
>> (source "/dev/sda")
>> (target "volume_group_name-logical_volume_name")
>> (kind lvm-device-mapping))
>>
>>and that would give me
>>/dev/mapper/volume_group_name-logical_volume_name, right?
>
> Volume group can be on multiple block devices. For now I rely on autodetect
> abilities of LVM.
>
> So you would declare:
>
> (mapped-device
> (source "") ; irrelevant for LVM
> (target "volume_group_name")
> (type lvm-mapping))
>
> and that would give you
> /dev/mapper/volume_group_name-some_volume
> /dev/mapper/volume_group_name-other_volume
> ...
>
> and more conveniently
> /dev/volume_group_name/some_volume
> /dev/volume_group_name/other_volume
> ...
OK. So the ‘source’ is irrelevant because ‘vgscan’ magically creates
the device nodes for volumes such that users don’t have to know what the
underlying block devices are, right?
[...]
>>> (boot-system #:mounts '#$(map file-system->spec file-systems)
>>> #:pre-mount (lambda ()
>>> - (and #$@device-mapping-commands))
>>> + (and #$@device-mapping-commands
>>> + ;; If we activated any volume group, we
>>> + ;; need to ensure that device nodes are
>>> + ;; created. Add code here to call it
>>> + ;; once for all activations.
>>> + #$(when (lvm-mapping-used? mapped-devices)
>>> + #~(zero?
>>> + (system* (string-append
>>> + #$lvm2/static
>>> + "/sbin/lvm.static")
>>> + "vgscan"
>>> + "--mknodes")))))
>>
>>So ‘lvm vgchange --activate y’ does not create /dev nodes?
>
> Right.
>
>>Would it be possible to change the command returned by
>>‘logical-volume-group-activate’ to somehow create the nodes? That would
>>be ideal.
>
> There are two actions needed to be taken:
> 1] volume group activation
> 2] creation of nodes
>
> This design choice does as many 1] as needed and 2] once in the end.
>
> I could do always 1] and 2] for every volume group, but I didn't find it nice,
> since previous 2] calls are useless only slowing down the process. Do you
> really think I should change it?
No, you’re right, what you did makes a lot of sense (thanks for bearing
with me!).
Could you send an updated patch? It sounds like we’re almost there,
I guess.
Thanks,
Ludo’.
next prev parent reply other threads:[~2015-05-03 20:00 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
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 [this message]
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=8761891lfq.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).