From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: LVM support Date: Sun, 03 May 2015 21:59:53 +0200 Message-ID: <8761891lfq.fsf@gnu.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yp03T-00034m-Ug for guix-devel@gnu.org; Sun, 03 May 2015 16:00:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yp03Q-0001zE-Na for guix-devel@gnu.org; Sun, 03 May 2015 15:59:59 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yp03Q-0001zA-J9 for guix-devel@gnu.org; Sun, 03 May 2015 15:59:56 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:43308 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Yp03P-0007Nu-MN for guix-devel@gnu.org; Sun, 03 May 2015 15:59:56 -0400 In-Reply-To: <20150501113230.GA1818@venom> (=?utf-8?B?IlRvbcOhxaEgxIxlY2gi?= =?utf-8?B?J3M=?= message of "Fri, 1 May 2015 13:32:30 +0200") 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 Sorry for the delay. 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 autodete= ct > 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 wha= t 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? ma= pped-devices) >>> + #~(zero? >>> + (system* (string-append >>> + #$lvm2/static >>> + "/sbin/lvm.s= tatic") >>> + "vgscan" >>> + "--mknodes"))= ))) >> >>So =E2=80=98lvm vgchange --activate y=E2=80=99 does not create /dev nodes? > > Right. > >>Would it be possible to change the command returned by >>=E2=80=98logical-volume-group-activate=E2=80=99 to somehow create the nod= es? 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 bea= ring with me!). Could you send an updated patch? It sounds like we=E2=80=99re almost there, I guess. Thanks, Ludo=E2=80=99.