From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?VG9tw6HFoSDEjGVjaA==?= Subject: Re: LVM support Date: Thu, 7 May 2015 10:02:43 +0200 Message-ID: <20150507080243.GA1683@venom.lan> References: <20150415050756.GC6648@venom> <878udt1sj5.fsf@gnu.org> <20150416062401.GD6648@venom> <87twwgxmrr.fsf@gnu.org> <20150417010911.GA610@venom> <87h9s9h41q.fsf@gnu.org> <20150501113230.GA1818@venom> <8761891lfq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqGlf-0001dh-IO for guix-devel@gnu.org; Thu, 07 May 2015 04:02:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqGla-0006t3-FP for guix-devel@gnu.org; Thu, 07 May 2015 04:02:51 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44643 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqGla-0006qu-5J for guix-devel@gnu.org; Thu, 07 May 2015 04:02:46 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B39EAADC1 for ; Thu, 7 May 2015 08:02:44 +0000 (UTC) Content-Disposition: inline In-Reply-To: <8761891lfq.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 03, 2015 at 09:59:53PM +0200, Ludovic Court=C3=A8s wrote: >Sorry for the delay. Sorry for all the delays :) > >Tom=C3=A1=C5=A1 =C4=8Cech skribis: > >> On Tue, Apr 21, 2015 at 05:52:33PM +0200, Ludovic Court=C3=A8s 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 autodet= ect >> 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 =E2=80=98source=E2=80=99 is irrelevant because =E2=80=98vgscan= =E2=80=99 magically creates >the device nodes for volumes such that users don=E2=80=99t have to know wh= at 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 volum= e group, we >>>> + ;; need to ensure that devic= e nodes are >>>> + ;; created. Add code here t= o call it >>>> + ;; once for all activations. >>>> + #$(when (lvm-mapping-used? m= apped-devices) >>>> + #~(zero? >>>> + (system* (string-appe= nd >>>> + #$lvm2/stat= ic >>>> + "/sbin/lvm.= static") >>>> + "vgscan" >>>> + "--mknodes")= )))) >>> >>>So =E2=80=98lvm vgchange --activate y=E2=80=99 does not create /dev node= s? >> >> Right. >> >>>Would it be possible to change the command returned by >>>=E2=80=98logical-volume-group-activate=E2=80=99 to somehow create the no= des? 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=E2=80=99re right, what you did makes a lot of sense (thanks for be= aring >with me!). Good. >Could you send an updated patch? It sounds like we=E2=80=99re almost ther= e, >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 --dDRMvlgZJXvWKvBx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVLHCEACgkQ37XrCapiVCOWZQCgpQdTcfBBvr1o4MqvaZZ7iaiv /yEAniWOuoxeR8JqBcKKB5c9FQWuTQ5y =TjT8 -----END PGP SIGNATURE----- --dDRMvlgZJXvWKvBx--