Show Table of Contents
2.5. 文件系统格式
本小节总结了 Red Hat Enterprise Linux 6 和 Red Hat Enterprise Linux 7 中支持的桌面用户环境的变化。
2.5.1. 新的默认文件系统:XFS
XFS 是一个具有非常高性能且可扩展的文件系统,同时在大多数要求的应用程序中都会进行常规部署。在 Red Hat Enterprise Linux 7 中,XFS 是默认文件系统并在所有架构中支持。
Ext4 不像 XFS 那么占有空间,且所有架构都支持该格式,因此将继续进行开发和支持。
有关 Red Hat 对 XFS 支持的限制,请参考 https://access.redhat.com/site/articles/rhel-limits。
有关使用及管理 XFS 文件系统的详情请参考 《Red Hat Enterprise Linux 7 存储管理指南》,网址 http://access.redhat.com/site/documentation/Red_Hat_Enterprise_Linux/。
2.5.1.1. 挂载选项的变化
与 ext3 和 ext4 不同,XFS 文件系统默认启用了
user_xattr 和 acl 挂载选项。就是说如果您在命令行或者 /etc/fstab 包含这些选项就会报错。
$ mount -o acl /dev/loop0 test
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
Ext3 和 Ext4 文件系统不会默认启用这些属性,但当您使用这个
mount 命令或者使用 /etc/fstab 挂载它们时也会接受这些选项。
2.5.2. Btrfs 技术预览
Red Hat Enterprise Linux 7 引进了 btrfs 作为技术预览。Btrfs 是下一代 Linux 文件系统,可提供高级管理、可靠性和可扩展性功能。Btrfs 为文件和元数据提供 checksum 确认。它还提供快照和压缩功能以及整合的设备管理。
有关 Red Hat 对 btrfs 支持的限制请参考 https://access.redhat.com/site/articles/rhel-limits。有关对技术预览支持等级的详情请参考 https://access.redhat.com/site/support/offerings/techpreview/。
有关使用及管理 btrfs 文件系统的详情请参考 《Red Hat Enterprise Linux 7 存储管理指南》,网址 http://access.redhat.com/site/documentation/Red_Hat_Enterprise_Linux/。
2.5.2.1. Kickstart 安装 btrfs
在 kickstart 文件中,要在系统中生成分区,通常要使用附带
--fstype 参数的 part 命令以生成使用具体文件系统的分区,比如:
part /mnt/example --fstype=xfs
但在 Red Hat Enterprise Linux 7.0 和 7.1 中,是将 btrfs 视为一个设备类型,而不是文件系统类型。因此,
btrfs 不是 --fstype 参数的有效值。反之,应使用 btrfs 命令定义 btrfs 卷,比如:
btrfs mount_point --data=level --metadata=level --label=label partitions
2.5.3. 延伸的文件系统支持
Red Hat Enterprise Linux 7 引进了统一扩展文件系统驱动程序,可提供对 Ext2、Ext3 和 Ext4 的支持。
但从 Red Hat Enterprise Linux 7 开始就将弃用 Ext2,因此应尽量避免使用。
有关这些文件系统的详情请查看 《Red Hat Enterprise Linux 7 存储管理指南》,网址 http://access.redhat.com/site/documentation/Red_Hat_Enterprise_Linux/。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.