[Nix-dev] [PATCHES] vsftpd and filesystems

Mathijs Kwik mathijs at bluescreen303.nl
Sat Feb 25 15:52:27 CET 2012


On Sat, Feb 25, 2012 at 2:22 PM, Eelco Dolstra <e.dolstra at tudelft.nl> wrote:
> On 25/02/12 08:45, Mathijs Kwik wrote:
>
>> A module that might not be available on some architectures / older
>> kernel versions / custom configs.
>
> That shouldn't be a problem because the script that builds the initrd skips
> missing modules (printing a warning).

I was referring to the use of "modprobe btrfs" in Bryce's original patch.
That wasn't initrd related, but would manually run modprobe from an
upstart task.

>
>> Yes, that's what I meant. Scan through configuration.nix's filesystems
>> list for any item with an explicit btrfs fsType (as opposed to just
>> leaving fsType out, which works fine in most setups). I didn't mean
>> adding an extra flag, sorry if I wasn't clear :)
>
> The downside to this is that it requires the user to specify fsType in
> configuration.nix.

Only users that have a special multi-disk btrfs setup. Using btrfs on
single partitions or on top of raid/md already works fine without it.
The only thing we need to fix is multi-disk (btrfs builting raid) setups.
They need a command to run before volumes become visible.
So it's either triggered by some new config flag
btrfs.multidiskScanner.enable, or reusing the fsType here, mandating
to specify it if you want to use multidisk.

>
> One idea might be to have nixos-hardware-scan add the necessary kernel module to
> the initrd.  I.e. it should add all modules necessary for mounting /mnt (the
> target filesystem at installation time).

That would be nice, but I think something like that is already there.
I never specified fsType for either ext4 or btrfs and it just seemed
to work.
I'm pretty sure the kernel or "mount" already checks the filesystem
type and know what modules to load. The issue here (multidisk) is that
the partition isn't valid, until btrfs scan somehow binds it to the
other parts.

Autodetecting that /mnt is on a multidisk btrfs is probably possible
by querying the btrfs userspace tools, but it's very specific. Just
stating "if you want to use multidisk btrfs, explicitly state the
fsType" sounds easier to me.

Please note that Bryce's question was not about a root partition, so
the installer/initrd aren't involved. This patch just takes care of
multivolume disks after root is mounted.



>
> --
> Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list