在Docker上使用不同的RAID分区 [英] Using different raid partitions with docker

查看:35
本文介绍了在Docker上使用不同的RAID分区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台Linux(Ubuntu)计算机,其中SSD RAID上有一个分区,而HDD RAID上有一个分区.我想将具有高流量的Docker容器(例如数据库)放在SSD部分上,而将其他容器放在便宜的HDD部分上.我在这里或其他任何地方都找不到答案.有可能吗?

I have a Linux (Ubuntu) machine with a partition on an SSD raid and a partition on an HDD raid. I want to put my docker containers with high traffic (like a database) on the SSD part and the other containers on the cheaper HDD part. I can't find an answer here or on other sides. Is there a possibility?

推荐答案

Docker本身并未提供基于每个容器的Docker存储级别的控制.

Docker itself doesn't provide that level of control over Docker storage on a per container basis.

您可以使用 devicemapper 存储驱动器和对容器文件系统使用特定的RAID逻辑卷.无法在容器运行时或通过某些策略在多个存储设备之间进行选择.

You can use the devicemapper storage driver and use a specific raid logical volume for the container file systems. There's no way to choose between multiple storage devices at container run time, or via some policy.

Docker确实具有,可以将其添加到容器中并卷插件,以对卷使用不同的存储后端.这些可以在每个容器的基础上进行控制.

Docker does have volumes that can be added to a container and volume plugins to use different storage backends for volumes. These can controlled on a per container basis.

有一个 LVM卷插件.您可以将SSD分配给lvm卷将数据卷分组并装入要在其中提供额外写入性能的任何容器中的数据卷.

There is an LVM volume plugin. You could assign SSD's to a lvm volume group and mount data volumes from that in any container you want the extra write performance in.

另一种选择是运行多个Docker守护程序,每个守护程序与每个存储配置一起运行,这将很难维护.

Another option would be to run multiple Docker daemons, one with each storage configuration, that would be difficult to maintain.

这篇关于在Docker上使用不同的RAID分区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆