Ceph OSDs rely heavily upon the stability and performance of the underlying file system.
ceph 的 OSD 依赖于底层文件系统的稳定性和性能。
Note We currently recommend XFS for production deployments. We recommend btrfs for testing,
development, and any non-critical deployments. We believe that btrfs has the correct feature set and
roadmap to serve Ceph in the long-term, but XFS and ext4 provide the necessary stability for today’s
deployments. btrfs development is proceeding rapidly: users should be comfortable installing the latest
released upstream kernels and be able to track development activity for critical bug fixes.
注意:当前,我们推荐部署生产系统时使用 xfs 文件系统,建议用 btrfs 做测试、开发和其他不太要紧的
部署。我们相信,长期来看 btrfs 适合 ceph 的功能需求和发展方向,但是 xfs 和 ext4 能提供当前部署所必
需的稳定性。btrfs 开发在迅速推进,用户应该有能力经常更新到最新内核发布,而且能跟踪严重 bug 的
修正进度。
Ceph OSDs depend on the Extended Attributes (XATTRs) of the underlying file system for various forms
of internal object state and metadata. The underlying file system must provide sufficient capacity for
XATTRs. btrfs does not bound the total xattr metadata stored with a file. XFS has a relatively large limit
(64 KB) that most deployments won’t encounter, but the ext4 is too small to be usable. To use these file
systems, you should add the following like to the [osd] section of your ceph.conf file.:
ceph 的 OSD 有赖于底层文件系统的扩展属性(XATTR)存储各种内部对象状态和元数据。底层文件系统
必须给 XATTR 提供足够容量,btrfs 没有限制随文件存储的 xattr 元数据;xfs 的限制相对大(64KB),多数
部署都不会有瓶颈;ext4 的则太小而不可用。要用这些文件系统,你得把下面这行写入 ceph.conf 的
[osd]段里。
filestore xattr use omap = true
FS BACKGROUND INFO
文件系统背景知识
The XFS and btrfs file systems provide numerous advantages in highly scaled data storage environments
when compared to ext3 and ext4. Both XFS and btrfs are journaling file systems, which means that they
are more robust when recovering from crashes, power outages, etc. These filesystems journal all of the
changes they will make before performing writes.
xfs 和 btrfs 相比较 ext3/4 而言,在高伸缩性数据存储方面有几个优势,xfs 和 btrfs 都是日志文件系统,
这使得在崩溃、断电后恢复时更健壮,因为文件系统在写入数据前会先记录所有变更。
XFS was developed for Silicon Graphics, and is a mature and stable filesystem. By contrast, btrfs is a
relatively new file system that aims to address the long-standing wishes of system administrators
working with large scale data storage environments. btrfs has some unique features and advantages
compared to other Linux filesystems.
xfs 由 Silicon Graphics 开发,是一个成熟、稳定的文件系统。相反,btrfs 是相对年轻的文件系统,它致
力于实现系统管理员梦寐以求的大规模数据存储基础,和其他 Linux 文件系统相比它有独一无二的功能和
优势。
btrfs is a copy-on-write filesystem. It supports file creation timestamps and checksums that verify
metadata integrity, so it can detect bad copies of data and fix them with the good copies. The copy-on-
write capability means that btrfs can support snapshots that are writable. btrfs supports transparent
compression and other features.
btrfs 是写时复制( copy-on-write, cow)文件系统,它支持文件创建时间戳和校验和(可校验元数据完整
性)功能,所以它能探测到数据坏副本,并且用好副本修复。写时复制功能是说 btrfs 支持可写文件系统
快照。btrfs 也支持透明压缩和其他功能。
btrfs also incorporates multi-device management into the file system, which enables you to support
heterogeneous disk storage infrastructure, data allocation policies. The community also aims to provide