optionally run "btrfs device scan" during mountall.
As reported by Bryce L Nordgren. Multi-disk btrfs filesystems need to get assembled first before they become mountable. Enable this by explicitly assigning fsType = "btrfs" in the filesystems list in configuration.nix svn path=/nixos/trunk/; revision=32682
This commit is contained in:
parent
4f8d076ae7
commit
b5dc3d520e
|
@ -3,9 +3,12 @@
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
needsBtrfsProgs = any (fs: fs.fsType == "btrfs") config.fileSystems;
|
||||||
|
|
||||||
# Packages that provide fsck backends.
|
# Packages that provide fsck backends.
|
||||||
fsPackages = [ pkgs.e2fsprogs pkgs.reiserfsprogs pkgs.dosfstools ];
|
fsPackages = [ pkgs.e2fsprogs pkgs.reiserfsprogs pkgs.dosfstools ]
|
||||||
|
++ optional needsBtrfsProgs pkgs.btrfsProgs;
|
||||||
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -175,6 +178,7 @@ in
|
||||||
exec > /dev/console 2>&1
|
exec > /dev/console 2>&1
|
||||||
echo "mounting filesystems..."
|
echo "mounting filesystems..."
|
||||||
export PATH=${config.system.sbin.mount}/bin:${makeSearchPath "sbin" ([pkgs.utillinux] ++ fsPackages)}:$PATH
|
export PATH=${config.system.sbin.mount}/bin:${makeSearchPath "sbin" ([pkgs.utillinux] ++ fsPackages)}:$PATH
|
||||||
|
${optionalString needsBtrfsProgs "${pkgs.btrfsProgs}/bin/btrfs device scan"}
|
||||||
${pkgs.mountall}/sbin/mountall
|
${pkgs.mountall}/sbin/mountall
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue