[Wylug-discuss] Btrfs home server
John Leach
john at johnleach.co.uk
Thu Sep 21 14:52:43 UTC 2017
On Tue, 2017-09-19 at 16:23 +0000, Scott Hodgson via Wylug-discuss
wrote:
> Hi
>
> Wanting to know what peoples thoughts are on setting up the
> filesystem on a home server.
> Got a 2 x 1tb hard drives setup for raid1.
> I want to use Linux containers for some websites so tried BTRFS. I
> used sda2 for uefi sda2 as BTRFS for /. Sda2 was then put in raid
> with BTRFS and sub volumes added.
> To test, I unplugged one of the drives but upon a reboot it went
> straight to initramfs shell. I sorted that by adding degraded to
> fstab and grub, however even though the partitions have the same
> uuid, it doesn't boot for one of the drives which makes me fear I
> could lose the information.
> Now I want the function of Btrfs but a bit more easy to use FS. My
> options are have a root partition and a /var partition and then make
> them BTRFS or other suggestions of a FS. Though do I use mdadm raid
> or btrfs raid or zfs raid? What are my options? Anyone have a
> solution? All opinions welcome.
>
>
I've been running a home server using btrfs raid1 for several years now
without any problems.
I run it under Debian, but I avoided the kinds of boot problems you
mentioned by actually booting from a small cheap 32GB SSD, which holds
the OS. Which means, given a problem with btrfs, I can always boot and
sort it out.
Obviously the SSD could fail, but it doesn't handle very many
reads/writes and doesn't hold any important data so is easy to replace
and reinstall given a problem (I backup the configs to the btrfs :)
A bit of a cop-out I know, but still, it's worked nicely for a long
time.
For your case, it's worth noting that, to be able to boot from both
disks directly (i.e: if one fails) they need the right boot sector
stuff and grub installation on both disks. I had the same problem with
the standard md raid1 setup. I never found a very satisfactory solution
for this - it was always a very complicated manual process to ensure
both disks were setup for boot. And it (usually) needs redoing any time
you upgrade grub.
The most annoying thing about this is, neither of my disks have
actually had a single problem. Not a single bit flipped. I run a btrfs
scrub every week and never had even one checksum problem or bad read.
That's with almost 4TB of data, millions of files, constantly churning.
I think I won the hard disk lottery. They'll go eventually and then
I'll be thankful for btrfs :)
John.
More information about the Wylug-discuss
mailing list