[Nix-dev] [PATCHES] vsftpd and filesystems

Mathijs Kwik mathijs at bluescreen303.nl
Fri Feb 24 07:49:56 CET 2012


On Thu, Feb 23, 2012 at 11:52 PM, Bryce L Nordgren <bnordgren at gmail.com> wrote:
> The following two patches are to address some issues I had trying to setup
> an ftp server with btrfs.
>
> vsftpd.patch :
> Patched to create an "upload" directory with the correct permissions if
> cfg.anonymousUser is true and cfg.anonymousUploadEnable is also true.
> Previously, an upload directory would have to be manually created. Also, I
> added an "additionalConfig" parameter to contain any additional text which
> needs to be added to "vsftpd.conf".
>
> filesystems.patch:
> Fixed for use with BTRFS filesystems. The fix involves doing a "modprobe
> btrfs" and "btrfs device scan" prior to mountall.

This patch forces loading of the btrfs module for everyone, and the
inclusion of the "btrfs" tool in everyone's initrd.

Perhaps you can just use boot.initrd.kernelModules and include btrfs there?
Normally, it seems nixos' initrd builder detects the filesystem type
that / is on and includes the needed filesystem module in the initrd.

I've been running with btrfs for some time and I didn't need to do
anything special. However, that was a single disk configuration
(laptop) so I didn't need "btrfs scan" or force module loading, or
even set the fsType in the fileSystems array.

Can you make these 2 lines (modprobe / scan) optional, depending on
any filesystem having an explicit "btrfs" fsType in configuration.nix
?
Then you just need to flag that if you are running a multi-disk btrfs
configuration.

Mathijs
>
>
>
> _______________________________________________
> 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