Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

Systemd fails to mount btrfs multidevice filesystems in stage 2 #152

Open
viric opened this issue Apr 23, 2013 · 5 comments
Open

Systemd fails to mount btrfs multidevice filesystems in stage 2 #152

viric opened this issue Apr 23, 2013 · 5 comments

Comments

@viric
Copy link
Member

viric commented Apr 23, 2013

First, this only affects btrfs fs to be mounted by systemd, thus, stage 2.

As current nixos master, only one block device can be told to be waited for.

In a usual btrfs approach, when all the block devices are ready, "btrfs dev scan" has to be run with the btrfs module loaded, and it will settle down the multidevice information.

I tried to get nixos supporting multiple devices in fileSystems, and having "btrfs dev scan" run as a udev rule, but this doesn't work: viric/nixos@master...systemd_btrfs

Currently, my mount point (mnt-hd.mount) fails to mount this way:

   Loaded: loaded (/nix/store/jjq9jaaq3dgdafqvhmg8cmvcqa452z9c-unit/mnt-hd.mount)
   Active: failed (Result: exit-code) since dc 2013-04-17 00:01:14 CEST; 25min ago
    Where: /mnt/hd
     What: /dev/mapper/seagate-lvol0
  Process: 1473 ExecMount=/nix/store/wbr4qkpf1y1f6hzxs7gp9a1imnypihq7-util-linux-2.22.2/bin/mount /dev/mapper/seagate-lvol0 /mnt/hd -t btrfs -o noatime,autodefrag (code=exited, status=32)

abr 17 00:01:14 nispro mount[1473]: mount: wrong fs type, bad option, bad superblock on /d...l0,
abr 17 00:01:14 nispro mount[1473]: missing codepage or helper program, or other error
abr 17 00:01:14 nispro mount[1473]: In some cases useful info is found in syslog - try
abr 17 00:01:14 nispro mount[1473]: dmesg | tail or so
abr 17 00:01:14 nispro systemd[1]: mnt-hd.mount mount process exited, code=exited status=32
abr 17 00:01:14 nispro systemd[1]: Failed to mount Mount of dev-mapper-seagate\x2dlvol0,d...ol0.
abr 17 00:01:14 nispro systemd[1]: Unit mnt-hd.mount entered failed state

I'm using this config, with my branch:

fileSystems = ...
    { mountPoint = "/mnt/hd";
      devices = [ "/dev/mapper/seagate-lvol0" "/dev/mapper/wdgreen-lvol0" ];
      options = "noatime,autodefrag";
      fsType = "btrfs";
      }

As an additional comment, systemd udev seems to have some magic about btrfs that I don't understand: http://lists.freedesktop.org/archives/systemd-commits/2012-September/002503.html

@vcunat
Copy link
Member

vcunat commented Apr 23, 2013

From the first look it seems to me that the udev "magic" is connected to multi-device btrfs filesystems.

My btrfs /home partition mounts fine (it's in stage2, isn't it?), but I only have systemd-200 and it's one-device only.

@viric
Copy link
Member Author

viric commented Apr 23, 2013

On Tue, Apr 23, 2013 at 12:50:42PM -0700, Vladimír Čunát wrote:

From the first look it seems to me that the udev "magic" is connected to multi-device btrfs filesystems.

Yes, to me too, but as something doesn't work for me, I'm a bit lost.

My btrfs /home partition mounts fine (it's in stage2, isn't it?), but I only have systemd-200.

I tried that in 199, 200 and 201, to no difference. Is your /home partition
multi-device, and over LVM?

@vcunat
Copy link
Member

vcunat commented Apr 23, 2013

No, just regular one-device (I added this info straight after posting the previous comment, but you only read the e-mail).

@viric
Copy link
Member Author

viric commented Apr 23, 2013

Ok, I think it's definitely a multidevice trouble :)

@domenkozar
Copy link
Member

Is this still an issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants