From mboxrd@z Thu Jan 1 00:00:00 1970 From: Taylan Kammer Subject: bug#31889: Filesystems must not depend on device mappings? Date: Fri, 22 Jun 2018 20:21:07 +0200 Message-ID: <8736xevg18.fsf@gmail.com> References: <87efh1qhs3.fsf@gnu.org> <87efh09dyd.fsf@gmail.com> <87h8lv6bzk.fsf@gnu.org> 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]:42557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWOp3-0000RV-Be for bug-guix@gnu.org; Fri, 22 Jun 2018 12:22:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWOp0-0008JN-6w for bug-guix@gnu.org; Fri, 22 Jun 2018 12:22:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52581) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWOp0-0008JJ-2m for bug-guix@gnu.org; Fri, 22 Jun 2018 12:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fWOoz-0005VO-TP for bug-guix@gnu.org; Fri, 22 Jun 2018 12:22:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87h8lv6bzk.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 21 Jun 2018 23:55:27 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 31889-done@debbugs.gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hi, > > Taylan Kammer skribis: > >> (mapped-devices >> (list (mapped-device >> (source (uuid "b3d059f8-1c4f-4569-88dd-5485825b4373")) >> (target "guixsd") >> (type luks-device-mapping)) >> (mapped-device >> (source (uuid "550d9258-bbbb-488c-af27-6b1fefa190ee")) >> (target "home") >> (type luks-device-mapping)))) >>=20=20=20=20=20=20 >> (file-systems >> (append >> (list (file-system >> (device "/dev/mapper/guixsd") >> (mount-point "/") >> (type "ext4") >> (dependencies mapped-devices)) >> (file-system >> (device "/dev/mapper/home") >> (mount-point "/home") >> (type "ext4") >> (dependencies mapped-devices))) >> %base-file-systems)) > > [...] > >> It results in the error message: >> >> guix system: error: service 'file-system-/home' requires >> 'device-mapping-home', which is not provided by any service > > [...] > >> It works when both '(dependencies mapped-devices)' clauses are simply >> removed. > > Yes, it=E2=80=99s =E2=80=9Cexpected=E2=80=9D: using =E2=80=9C/dev/mapper/= xyz=E2=80=9D as the device is enough to > express the dependency. > > When passing (dependencies mapped-devices), the effect was to each file > system depend on *both* mapped devices. This leads to an inconsistency > because /dev/mapper/guixsd is =E2=80=9Cneeded-for-boot=E2=80=9D (i.e., se= t up from the > initrd), whereas /dev/mapper/home is not (i.e., set up as a Shepherd > service.) > > The solution is to either use the /dev/mapper/xyz names in the =E2=80=98d= evice=E2=80=99 > field, or to specify only the relevant mapped device in =E2=80=98dependen= cies=E2=80=99. > > Anyway, commit 68a58775e071d4b0e000b93ad121b6e64d161b79 fixes it by > doing exactly what this config asks for: setting up all the mapped > devices in the initrd. > > Thanks, > Ludo=E2=80=99. Thank you for the explanation and the fix! :-) Taylan