April 7, 20251 yr My HDDs are formatted as 4096 byte logical and physical sector devices. When running lsblk, the actual devices (sdb, sdc, sdd, etc.) show this correctly, but the md devices (md1p1, md2p1) show up as 512 byte sectors. This has implications for correctly formatting disks, as it causes both LUKS and XFS to default to 512 byte sector sizes when formatting. I had to manually format the drives using the command line options to specify sector size to work around this. Things seem to be working fine now (and, oddly enough, the LUKS mapper devices report 4096 logical/physical sectors), but I'm wondering if there's some option to cause the array drives to be considered as 4kn without jumping through hoops like this? Edited April 7, 20251 yr by jonahbenn
April 7, 20251 yr Community Expert Solution 7 minutes ago, jonahbenn said: but I'm wondering if there's some option to cause the array drives to be considered as 4kn without jumping through hoops like this? Not currently, but LT is aware of the issue, and it should be corrected in the near future, though there shouldn't be any noticeable performance issues using the defaults, since the md driver uses 4k blocks for i/o already.
April 7, 20251 yr Author 3 hours ago, JorgeB said: Not currently, but LT is aware of the issue, and it should be corrected in the near future, though there shouldn't be any noticeable performance issues using the defaults, since the md driver uses 4k blocks for i/o already. Could the mismatch between, say, XFS expecting 4KiB sectors and getting (I'm assuming) 512B sectors cause any issues? I haven't run into any yet personally, but it does make me anxious to think about.
April 8, 20251 yr Community Expert 9 hours ago, jonahbenn said: XFS expecting 4KiB sectors and getting (I'm assuming) 512B sectors cause any issues? I would think that if there were issues you would see them during the 1st mount, but it's not something I've tested, I do know it doesn't mount the other way around, i.e., if xfs formats the devices with 512B, and then you try to mount them outside the array, with 4Kn drives.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.