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

Are ext4 RAID5 tuning options useful under LVM?

· 52CE 我爱测

I'm setting up a system with a system with a mdadm RAID5 which is the sole PV for a VG which hosts 4 LVs. When I make the filesystem, would the mkfs.ext4 -E option be useful? Or is its effect not possible to know because of LVM s…

问题原文

原帖链接 · OmnipotentEntity · CC BY-SA 3.0

I'm setting up a system with a system with a mdadm RAID5 which is the sole PV for a VG which hosts 4 LVs.

When I make the filesystem, would the mkfs.ext4 -E option be useful? Or is its effect not possible to know because of LVM shenanigans?

-E extended-options
    Set extended options for the filesystem. Extended options are comma separated, and may take an argument using the equals ('=') sign. The -E option used to be -R in earlier versions of mke2fs. The -R option is still accepted for backwards compatibility. The following extended options are supported:  
stride=stride-size
    Configure the filesystem for a RAID array with stride-size filesystem blocks. This is the number of blocks read or written to disk before moving to the next disk, which is sometimes referred to as the chunk size. This mostly affects placement of filesystem metadata like bitmaps at mke2fs time to avoid placing them on a single disk, which can hurt performance. It may also be used by the block allocator. 
stripe-width=stripe-width
    Configure the filesystem for a RAID array with stripe-width filesystem blocks per stripe. This is typically stride-size * N, where N is the number of data-bearing disks in the RAID (e.g. for RAID 5 there is one parity disk, so N will be the number of disks in the array minus 1). This allows the block allocator to prevent read-modify-write of the parity in a RAID stripe if possible when the data is written. 

已采纳解答

原帖链接 · Hauke Laging · CC BY-SA 3.0

This makes sense only if you ensure that your PVs are aligned to the RAID chunk size (LVs should be automatically). You can check that by

pvs -o pe_start,pv_name --units s
dmsetup table name # with name what you see in /dev/mapper

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

资料来源与适用范围

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

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

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