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

Re: Planning a Debian NAS



Linux-Fan wrote: 
> Aidan Gauland writes:
> 
> > I want to set up a file server on my home LAN with just consumer-grade
> > hardware, and run Debian stable on it.  For hardware, I am probably
> > going to get a refurbished mid-range tower with a four to six 3.5" SATA
> > drive capacity, and put WD Reds in it.
> > 
> > What I'm not sure of which filesystem to use.  I could just use ext4
> > with RAID5 or RAID6 to get striping with some fault tolerance (i.e. time
> > to replace a failed drive without losing everything). ZFS looks easier,
> > but only if you're on BSD.  btrfs sounds like ZFS for Linux, but it
> > appears to still be of beta quality, and I can't tell whether it can yet
> > do striping with parity.  Any advice?
> 
> I'd recommend the ext4 filesystem in combination with RAID1 with MDADM of
> each two devices such that you have two or three filesystems.
> If everything needs to be a single filesystem, I'd go for RAID10.

This is good, conservative advice.

> I'd stay away from either btrfs or ZFS for these reasons:
> 
> btrfs: There have been multiple reports of data loss or difficulty with
> maintaining this filesystem. Although they might be fixed in newer versions,
> the current status remains unclear to me. Additionally, the performance
> behaviour (e.g. when deleting many files) is different from other file
> systems and might be unexpected/unwanted.

Concur.

> ZFS: If it were as easily available as the other kernel-integrated file
> systems, I'd definitely vote for ZFS.

It's quite close. "apt install debian-zfs".

> Although I percieved it as complex in
> the past, after two hours of experimentation in a VM, it did not seem more
> complex than the ext4+mdadm variant which I am using as of now. I can
> confirm that ZFS needs some RAM: For me it was much more than the
> 1 GiB/TiB which I had read before, but then again I had a special use case
> with many small files.

Like Linux, ZFS will use all the RAM that it can. Also like
Linux, ZFS will give up most of that RAM when other applications
come knocking.

The primary exception is when you turn on deduplication. Never turn on
deduplication. 

> Other points which I repeatedly see in ZFS
> discussions (without knowing their validity whatsoever):
> 
> * ZFS making good use of RAM means non-ECC-RAM can enlarge the chance
>   of data corruption.

No, you're misinterpreting. Once you have ZFS running, the
primary remaining source of data corruption is memory errors.
Without ZFS, you have exactly the same chance of data corruption
via memory errors... but that's swamped by all the other chances
for data corruption.

> * ZFS being a server filesystem means power outrages are not handled well.

I haven't found this to be true, but I also tend to put my
servers on UPSen.

> These are all points which do not drive me away. My reason for not using ZFS
> is simply: It is not integrated into the Linux kernel. Upon every kernel
> update, there is a `dkms`-step involved and if it fails, the system will
> fail to boot.

That's only the case if you use ZFS as your root filesystem.  There's no
requirement to do that; ext4 for root and ZFS for everything else is a
nice, resilient way of getting things done.

-dsr-


Reply to: