unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Tomáš Čech" <sleep_walker@gnu.org>
To: guix-devel@gnu.org
Subject: Re: LVM support
Date: Thu, 7 May 2015 10:02:43 +0200	[thread overview]
Message-ID: <20150507080243.GA1683@venom.lan> (raw)
In-Reply-To: <8761891lfq.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3881 bytes --]

On Sun, May 03, 2015 at 09:59:53PM +0200, Ludovic Courtès wrote:
>Sorry for the delay.

Sorry for all the delays :)

>
>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?

Yes.


>[...]
>
>>>>           (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!).

Good.

>Could you send an updated patch?  It sounds like we’re almost there,
>I guess.

Not there yet. Now I need to make some changes with mounting order to help
non-root filesystems on LVM volume.

Right now it seems it tries to:
1] mount all filesystems
2] run udev

But I need to make it:
1] mount /dev
2] run udev service (with the `udevadm settle' in the end)
3] mount the rest of filesystems

It seems that /sys and /proc is mounted already from initrd phase using
mount-essential-file-systems. Is there reason not to put /dev there as well?

I see none so I'll try to add /dev filesystem mounting there (and to
move-essential-file-systems) and remove it from %base-file-systems.

Best regards,

S_W

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2015-05-07  8:02 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
2015-05-07  8:02               ` Tomáš Čech [this message]
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=20150507080243.GA1683@venom.lan \
    --to=sleep_walker@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).