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: Wed, 15 Apr 2015 14:32:14 +0200 Message-ID: <878udt1sj5.fsf@gnu.org> References: <20150415050756.GC6648@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]:33145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiMUP-0002DJ-7O for guix-devel@gnu.org; Wed, 15 Apr 2015 08:32:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiMUL-0008J0-Cd for guix-devel@gnu.org; Wed, 15 Apr 2015 08:32:21 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiMUL-0008Iw-9w for guix-devel@gnu.org; Wed, 15 Apr 2015 08:32:17 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:57680 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YiMUK-0005Zt-GG for guix-devel@gnu.org; Wed, 15 Apr 2015 08:32:17 -0400 In-Reply-To: <20150415050756.GC6648@venom> (=?utf-8?B?IlRvbcOhxaEgxIxlY2gi?= =?utf-8?B?J3M=?= message of "Wed, 15 Apr 2015 07:07:56 +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 Tom=C3=A1=C5=A1 =C4=8Cech skribis: > as project for my Hackweek in SUSE I decided to spend my time on LVM > support in GuixSD - something I miss greatly. This also means that > I'll have much less time for that after this week :( Well this is nice already! > So far I spent time on reviving my GuixSD installation and preparing > staticly linked binaries for initrd. I have now lvm2 package with > extra output "static".=20 Don=E2=80=99t worry about static linking or anything: you can use any packa= ge, including dynamically-linked, and it will be magically added to the initrd if needed. Then as a second step, since that=E2=80=99ll probably be very big, you can = work on statically-linked variants of the relevant packages (as done for =E2=80=98e2fsck/static=E2=80=99.) > Now the simplest way would be to simply call > > vgchange --activate y > > Matching configuration could be one configuration option: > (use-lvm?) > > > That would scan all block devices and look for LVM signature. > > Pros: > - it's super simple! > Cons: > - if LVM with filesystem required at boot-time is not found, error > is not detected or returned by LVM itself > > > > Slightly bit more complicated way could be > > vgchange --activate y > > for every volume group defined in system configuration. Matching configur= ation could be > (logical-volume-groups '("system" "data")) > > e.g. specify list of volume group names used by system. > > Pros: > - still simple > - if group activation fails, I can detect it and report it to user > > Cons: > - some block devices with LVM may not be available at boot-time (like > iSCSI devices accessible through network only or Luks devices > available after entering password) > > That is my current approach. > > > > I could also specify whether it should be made available at boot time or = not > (logical-volume-groups '('("system" #t) > '("data" #f))) > > (sorry for my poor Scheme taste here :) > > Pros: > - with this I could say that volume group "system" should be activated > at boot time, but "data" should be activated later. > > Cons: > - starting to be more complicated - I need both initrd stage LVM > activation and root filesystem stage LVM activation (implemented as > service? which dependencies it has?) Sorry I=E2=80=99m not really familiar with LVM. Technically, if LVM volumes are mapped devices, the best would be to define a structure for them, as discussed on IRC (like =E2=80=98luks-device-mapping=E2=80=99 in (gnu system).) Then users would need to adjust their =E2=80=98mapped-devices=E2=80=99 acco= rdingly (info "(guix) Mapped Devices"). How does that sound? Thanks, Ludo=E2=80=99.