大网数据广告活动
服务器运维问答

What is the recommended way to setup Docker on a multi-drive server in a fault tolerant mode?

· 52CE 我爱测

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…

问题原文

原帖链接 · Frank Barcenas · CC BY-SA 4.0

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?

已采纳解答

原帖链接 · kasperd · CC BY-SA 4.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。