Skip to content

Nonzero /sys/block/.../alignment_offset when creating RAID volumes with certain (PE size, regionsize, LV size) combinations #183

@eternaleye

Description

@eternaleye

In a VG with a 1MiB PE size, and the default 2MiB RAID region size, creating 4TiB RAID1 LV resulted in a -1 alignment_offset. This seems like it results from some failure to consider the region size when automatically aligning LVs.

This is particularly concerning given the configured region size may be overridden based on the LV size, due to the 2^21 region limit in MD raid bitmaps - for 4TiB RAID1 LVs, this coincides with the 2MiB default, but for larger LVs this will first exceed that (e.g. an 8TiB RAID1 LV would force a 4MiB region size), and then the default PE size (e.g. a 16TiB RAID1 LV would force an 8MiB region size).

As a result, growing disk sizes result in this failure to maintain alignment occurring even with default PE sizes; therefore, it seems important that LV creation take the RAID region size (after raid_ensure_min_region_size is applied) into account when aligning LVs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions