GNU bug report logs - #25937
luks mapped-devices does not support multiple mapped-devices

Previous Next

Package: guix;

Reported by: ng0 <contact.ng0 <at> cryptolab.net>

Date: Thu, 2 Mar 2017 16:22:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25937 in the body.
You can then email your comments to 25937 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#25937; Package guix. (Thu, 02 Mar 2017 16:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to ng0 <contact.ng0 <at> cryptolab.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 02 Mar 2017 16:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ng0 <contact.ng0 <at> cryptolab.net>
To: bug-guix <at> gnu.org
Subject: luks mapped-devices does not support multiple mapped-devices
Date: Thu, 2 Mar 2017 16:21:19 +0000
While I'm trying to solve this[0] issues, rekado suggested to either use
a let or a define for the initial error I encountered.

This lead to the system config which can be seen here:
http://paste.lisp.org/display/340362#1 , still resulting in error:

user <at> greendragon ~$ guix system build /etc/config.scm                                                                              
guix system: error: service 'file-system-/mnt/dg2' requires
'file-system-/', which is not provided by any service

My guess is that mapped-devices does not consider cases where more than
one luks-device is present. I haven't tried the final use-case yet which
is bringing raid-mapped-devices in there, I expect this not to happen
before this issue is fixed, to have isolated and not multiple causes of
failure/errors.

Should the lisp.org paste disappear I can append my system config, for
now the paste is enough.

0: https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00024.html 




Information forwarded to bug-guix <at> gnu.org:
bug#25937; Package guix. (Sun, 03 May 2020 16:40:01 GMT) Full text and rfc822 format available.

Message #8 received at 25937 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: contact.ng0 <at> cryptolab.net, 25937 <at> debbugs.gnu.org
Subject: Bug#25937 Status? luks mapped-devices
Date: Sun, 3 May 2020 18:39:39 +0200
Dear,

Digging in the bug tracker, I found this bug report [1]. What is its status?
Is it solved for you?

Best regards,
simon

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25937




Information forwarded to bug-guix <at> gnu.org:
bug#25937; Package guix. (Sun, 03 May 2020 18:53:02 GMT) Full text and rfc822 format available.

Message #11 received at 25937 <at> debbugs.gnu.org (full text, mbox):

From: Nikita Gillmann <nikita <at> NetBSD.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 25937 <at> debbugs.gnu.org
Subject: Re: Bug#25937 Status? luks mapped-devices
Date: Sun, 3 May 2020 19:00:29 +0200
Hi,

zimoun transcribed 0.2K bytes:
> Dear,
> 
> Digging in the bug tracker, I found this bug report [1]. What is its status?
> Is it solved for you?

I have no idea, best to wait for someone using Guix System or Guix. I
haven't touched it since 2019 and in late 2018 this bugreport was still
relevant, I remember early 2019 it still being an issue.
 
> Best regards,
> simon
> 
> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25937




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Wed, 18 Aug 2021 03:03:02 GMT) Full text and rfc822 format available.

Notification sent to ng0 <contact.ng0 <at> cryptolab.net>:
bug acknowledged by developer. (Wed, 18 Aug 2021 03:03:02 GMT) Full text and rfc822 format available.

Message #16 received at 25937-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 25937-done <at> debbugs.gnu.org, contact.ng0 <at> cryptolab.net
Subject: Re: bug#25937: luks mapped-devices does not support multiple
 mapped-devices
Date: Tue, 17 Aug 2021 23:02:11 -0400
Hello,

zimoun <zimon.toutoune <at> gmail.com> writes:

> Dear,
>
> Digging in the bug tracker, I found this bug report [1]. What is its status?
> Is it solved for you?
>
> Best regards,
> simon
>
> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25937

Recopying the content here for ease of reference:

> upon trying to create a system with multiple mapped-devices the
> current documentation about mapped-devices doesn't help me anymore.

> So far I'm just trying with two luks devices, I'll get RAID in there as
> a third device later.
> So this part in a config.scm:

>   (mapped-devices
>    (list (mapped-device
>           (source (uuid "fooooo1233333333333333333"))
>           (target "my-root")
>           (type luks-device-mapping))
>          (mapped-device
>            (source (uuid "fooooo124444444444444444"))
>            (target "dg2")
>            (type luks-device-mapping))))

>   (file-systems (cons* (file-system
>                         (device "my-root")
>                         (title 'label)
>                         (mount-point "/")
>                         (type "ext4")
>                         (dependencies mapped-devices))
>                       (file-system
>                         (device "/dev/sdb1")
>                         (title 'device)
>                         (mount-point "/mnt/dg1")
>                         (type "ext4"))
>                       (file-system
>                         (device "dg2")
>                         (title 'label)
>                         (mount-point "/mnt/dg2")
>                         (type "ext4")
>                         (dependencies mapped-devices))
>                       %base-file-systems))
>
> ...fails with this error:

> address <at> hidden ~$ guix system build /etc/config.scm

> guix system: error: service 'file-system-/mnt/dg2' requires
> 'device-mapping-my-root', which is not provided by any service

> How do I fix this?

From info "(guix)File Systems":

     When the source of a file system is a mapped device (*note
     Mapped Devices::), its ‘device’ field _must_ refer to the
     mapped device name—e.g., ‘"/dev/mapper/root-partition"’.  This
     is required so that the system knows that mounting the file
     system depends on having the corresponding device mapping
     established.

So it seems that you must provide "/dev/mapper/my-root" instead of
referring to it by label.  Although, I was able to reconfigure with the
following mapped devices/file systems:

--8<---------------cut here---------------start------------->8---
    (mapped-devices
     (list (mapped-device
            (source (uuid "0792432c-78d8-4dcc-87c5-30200c3d02db");"/dev/sda2"
                    )
            (target "cryptroot")
            (type luks-device-mapping))
           (mapped-device
            (source (uuid "a9aead40-9d01-4f7a-bb83-be70dd192b7b");"/dev/sdb2"
                    )
            (target "cryptroot-mirror")
            (type luks-device-mapping))
           (mapped-device
            (source (uuid "f0afd5c9-da70-46a7-9c6f-5d22913638bf");"/dev/sdc2"
                    )
            (target "cryptroot-mirror2")
            (type luks-device-mapping))))

    ;; Note: Using any of the LUKS encrypted drives exposed under
    ;; /dev/mapper is enough to reference the Btrfs RAID-1 array,
    ;; since the 'btrfs device scan' command is executed in the init
    ;; RAM disk and takes care of assembling the array.
    (file-systems (cons* (file-system
                           (mount-point "/")
                           (device (file-system-label "my-root"))
                           (type "btrfs")
			   (options (alist->file-system-options
                                     (cons '("subvol" . "@root")
                                           %common-btrfs-options)))
			   (dependencies mapped-devices))
                         (file-system
                           (device "/dev/mapper/cryptroot-mirror")
                           (mount-point "/home")
                           (type "btrfs")
                           (options (alist->file-system-options
                                     (cons '("subvol" . "@home")
                                           %common-btrfs-options)))
                           (dependencies mapped-devices))
                         (file-system
                           (device "/dev/mapper/cryptroot-mirror2")
                           (mount-point "/data")
                           (type "btrfs")
                           (options (alist->file-system-options
                                     (cons '("subvol" . "@data")
                                           %common-btrfs-options)))
                           (dependencies mapped-devices))
                         %base-file-systems))
--8<---------------cut here---------------end--------------->8---
                         
So perhaps that particular limitation has been lifted, or perhaps Btrfs
is different in this regard.

I'll close the bug, but feel free to reopen it if you still have
problems.

Thank you,

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 15 Sep 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 216 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.