1

I have a server with 4 250GB sata drives on regular sata controllers. I would like to setup Docker on some sort of fault tolerant file system so that if one of the drives fails the whole thing doesn't collapse.

I'm pretty sure it's probably not possible to format all fours drive as ZFS and have them as your boot drive as well for the OS. And ZFS is not recommended by the Docker WIKI anyways: https://docs.docker.com/storage/storagedriver/zfs-driver/

Maybe there is another fault-tolerant file system that Docker is compatible with?

Any ideas as to what is recommended in this case?

Frank Barcenas
  • 605
  • 6
  • 18
  • I guess you would want some RAID configuration other than RAID0. I image that your server documentation would tell you how to set up a RAID. You may have some sort of RAID already set up but just don't know it. You'd think Docker wouldn't care about something like RAID level. – Red Cricket Aug 12 '18 at 04:35
  • @RedCricket So you're recommending just plain old software raid? LIke MDADM? – Frank Barcenas Aug 12 '18 at 04:46
  • Sorry it has been a while since I had done any stacking and racking but we used HP ProLiant servers and you could set up your RAID level in the Bios. I believe we used RAID5 and could actually pull a live hard drive out of the server and it keep running. – Red Cricket Aug 12 '18 at 04:50

2 Answers2

2

The exact wording of the recommendation you mention is this:

The ZFS on Linux (ZoL) port is healthy and maturing. However, at this point in time it is not recommended to use the zfs Docker storage driver for production use unless you have substantial experience with ZFS on Linux.

What it recommends is not to use it in production unless you have experience with it. Whether you already have that experience is something you will have to judge for yourself. Whether it is a good idea for you to start working on acquiring that ZFS experience such that you can at some point start using it in production is a matter of opinion and thus that part is off-topic for this site.

If you do decide that you want to get the experience with ZFS you could do so by setting up a test environment with ZFS which as closely as possible resembles the production environment you would be using it in. In order to really get experience from a test environment you have to stress it a little bit. For example you can run it with a missing disk for a bit in order to learn how it behaves when a disk is missing and what the procedure to replace a failed disk would be. And to ensure you didn't miss anything in those procedures you can replace all the disks one by one and verify that the system keeps working.

Whether a storage setup is usable for /boot or not shouldn't influence your choice of setup for /.

It's well supported to make /boot a separate mount point for that exact reason. For /boot I usually use a 2GB mdadm RAID-1 array across all the media. It may come across as slightly wasteful with that many replica, but it means that it doesn't matter which of the disks the system is booted from which I consider worth the cost in disk space.

That way of setting up /boot is one I would recommend in a wide range of setups, and it may well apply to you regardless of whether you choose ZFS for / or not.

kasperd
  • 30,455
  • 17
  • 76
  • 124
1

Use MDADM and create a RAID.

Unless your server has a RAID controller, that's your best bet for hard drive redundancy in such a set up.

ETL
  • 6,513
  • 1
  • 28
  • 48
  • So the first drive would not be in the raid? – Frank Barcenas Aug 13 '18 at 02:04
  • No reason why the "first drive" wouldn't be part of the RAID. Docker and the Operating System are two different things and are really not relevant to each other. Install your machine, with the OS and usually at install time you can create the RAID. There maybe are ways to do it after having the OS already installed... – ETL Aug 13 '18 at 14:25