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.
In a VG with a 1MiB PE size, and the default 2MiB RAID region size, creating 4TiB RAID1 LV resulted in a
-1alignment_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^21region 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_sizeis applied) into account when aligning LVs.