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

mkfs -O ^64bit,^metadata_csum -t ext4 in 2019

· 52CE 我爱测

Thomas Krenn recommends creating ext4 partitions like: https://www.thomas-krenn.com/de/wiki/FSCK_Best_Practices mkfs -O ^64bit,^metadata_csum -t ext4 what does this mean? does this have anything to do with the y2038 problem? http…

问题原文

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

Thomas Krenn recommends creating ext4 partitions like:

https://www.thomas-krenn.com/de/wiki/FSCK_Best_Practices

mkfs -O ^64bit,^metadata_csum -t ext4

what does this mean?

does this have anything to do with the y2038 problem?

https://en.wikipedia.org/wiki/Year_2038_problem

"A user should be able to turn on this feature at mke2fs time simply by specifying -O metadata_csum. Because the 64bit feature allows arbitrarily large block group descriptors that are large enough to enable crc32c for the bitmaps, mke2fs should warn the user if the feature set is metadata_csum,^64bit when it becomes the case that the 64bit feature has been tested thoroughly."

https://ext4.wiki.kernel.org/index.php/Ext4_Metadata_Checksums

what is recommended? move to btrfs?

thanks!

社区高分解答

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

This is an excerpt from the kernel documentation for metadata_csum and 64bit:

Starting in early 2012, metadata checksums were added to all major ext4 and jbd2 data structures. The associated feature flag is metadata_csum.
The desired checksum algorithm is indicated in the superblock, though as of October 2012 the only supported algorithm is crc32c. Some data structures did not have space to fit a full 32-bit checksum, so only the lower 16 bits are stored. Enabling the 64bit feature increases the data structure size so that full 32-bit checksums can be stored for many data structures. However, existing 32-bit filesystems cannot be extended to enable 64bit mode, at least not without the experimental resize2fs patches to do so. Existing filesystems can have checksumming added by running tune2fs -O metadata_csum against the underlying device. If tune2fs encounters directory blocks that lack sufficient empty space to add a checksum, it will request that you run e2fsck -D to have the directories rebuilt with checksums. This has the added benefit of removing slack space from the directory files and rebalancing the htree indexes. If you ignore this step, your directories will not be protected by a checksum!

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

资料来源与适用范围

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

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

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