[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I specify a btrfs subvolume?

From: Maxim Cournoyer
Subject: Re: How do I specify a btrfs subvolume?
Date: Wed, 17 Mar 2021 22:48:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)


raingloom <> writes:

> On Sun, 14 Mar 2021 20:33:06 -0500
> Nathan Dehnel <> wrote:
>> This is extremely confusing:

Hello!  Trying to explain it was a real challenge.  Would you mind
detailing what exactly got you confused?  Hopefully it can be improved.

>> I made my best attempt at creating and mounting a subvolume at
>> /media/offsite-backup:
>>   (file-systems
>>     (cons* (file-system
>>              (mount-point "/")
>>              (device
>>                (uuid "b2e0f449-0583-46fd-8c23-ad2e6cd661a1"
>>                      'btrfs))
>>              (type "btrfs"))
>>            (file-system
>>              (mount-point "/media/offsite-backup")
>>              (device
>>                (uuid "b2e0f449-0583-46fd-8c23-ad2e6cd661a1"
>>                      'btrfs))
>>              (type "btrfs")
>>              (options "subvol=offsite-backup,compress=zlib:9"))
>> It gives this error:
>> building
>> /gnu/store/mrs1qbg619qk4n2lv8k377arclgzwqjq-install-bootloader.scm.drv...
>> guix system: bootloader successfully installed on '/dev/sda' guix
>> system: warning: exception caught while executing 'start' on service
>> 'file-system-/media/offsite-backup': In procedure mount: mount
>> "/dev/sda2" on "///media/offsite-backup": No such file or directory
>> guix system: warning: some services could not be upgraded
>> But /media/offsite-backup exists.

Trying it on my end.

$ blkid
/dev/sda2: UUID="0792432c-78d8-4dcc-87c5-30200c3d02db" TYPE="crypto_LUKS" 
/dev/mapper/cryptroot: UUID="2e97fbbd-fa4e-4858-948b-b3a89278a39b" 
UUID_SUB="7cf6061d-a2d8-4c69-ad34-8d8e31b973cd" TYPE="btrfs"
/dev/sdc: UUID="7bb7e1dd-b0f9-45dc-bf2a-39c6d3a4ee42" TYPE="crypto_LUKS"
/dev/sdb2: UUID="a9aead40-9d01-4f7a-bb83-be70dd192b7b" TYPE="crypto_LUKS" 

According to [0], on has to use the UUID rather than the UUID_SUB;
perhaps that's what is causing you problems if you used the UUID_SUB?  I
updated my (working) file system declaration from:

    (file-systems (cons* (file-system
                           (mount-point "/")
                           (device "/dev/mapper/cryptroot")
                           (type "btrfs")
                           (options "compress-force=zstd,space_cache=v2")
                           (dependencies mapped-devices))


    (file-systems (cons* (file-system
                           (mount-point "/")
                           (device (uuid "2e97fbbd-fa4e-4858-948b-b3a89278a39b"
                           (type "btrfs")
                           (options "compress-force=zstd,space_cache=v2")
                           (dependencies mapped-devices))

reconfigured and reboot.  Granted, I don't currently mount a subvolumes
on this machine.  I do on a second one, I could try it there too if
you're still blocked.

> I'm looking at
> and it seems like you either need a numberic ID or an absolute path,
> not a relative one.
> On my machine `findmnt` returns `subvol=/`.

In Guix, you want to use the subvolume name (that's the 'subvol'
option), not the subvolume ID, as Guix relies on the subvolume name to
generate the GRUB configuration.  This is explained in the manual and an
error message with a hint should be displayed when attempting to use
subvolumes with an ID for the root file system.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]