yast / yast-storage-ng

Rewrite of https://github.com/yast/yast-storage
http://yast.github.io/
GNU General Public License v2.0
14 stars 20 forks source link

Y2Partitioner: Allow 4 KiB Min Chunk Size for RAID0 / RAID10 [SLE-15-SP4] #1303

Closed shundhammer closed 2 years ago

shundhammer commented 2 years ago

Target Branch

This is for the SLE-15-SP4 branch. Merge to master / Factory: https://github.com/yast/yast-storage-ng/pull/1304

Bugzilla

https://bugzilla.suse.com/show_bug.cgi?id=1200018

Trello

https://trello.com/c/YN8fSMy3

Problem

A customer wishes to use 4 KiB (page size) chunks for creating a RAID0 on NVME, but the YaST partitioner does not offer that selection; it starts with 64 KiB.

yast-raid-chunk-size

Cause

Back when we introduced that feature, we decided on a minimum chunk size of 64 KiB unless the default chunk size for that RAID type would suggest something smaller. For RAID0, there was no different default, so the minimum was 64 KiB.

There was no strict technical limitation behind this minimum, only our belief back at the time (in 2017) that smaller values would not be useful.

Fix

Use a more elaborate minimum, depending on RAID type:

yast-raid-chunk-size-4k

Now the minimum chunk size for RAID0 is 4 KiB, but the default is still 64 KiB which might is probably better for performance in most scenarios.

Related PR

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.0003%) to 97.821% when pulling 72285d09d6e96d7f239c088b20a2a8360b2aefb8 on huha-raid0-4k-chunks into 84a7e114d5af52c0149b271b481f9eb0b6cdf409 on master.

shundhammer commented 2 years ago

@aschnell FYI - please check if there is a technical reason from the libstorage-ng perspective against this.

aschnell commented 2 years ago

Unfortunately there are some more constrains:

shundhammer commented 2 years ago
  • For RAID10 the chunk size must not be smaller than the page size (e.g. on ppc64 that is 64 KiB, see bug #1065381).

Good point. Fixed.

  • For RAID0 the library also checks that the chunk size is a multiple of the sector size of all devices. That is likely not a big problem since the sector size is usually 512 B or 4 KiB.

Yes, we always start with a power of 2 to begin with, and keep doubling that value until we reach 64 MiB.

yast-bot commented 2 years ago

:heavy_check_mark: Internal Jenkins job #7 successfully finished :heavy_check_mark: Created IBS submit request #273285