Bug#885575: md: potentially incorrect warnings about alignment
Package: linux
Version: 4.13.13-1~bpo9+1
Looking at the output of dmesg, I see warnings like this:
md0: Warning: Device sde3 is misaligned
Checking the same disk with parted tells me it is aligned correctly:
# parted /dev/sde
GNU Parted 3.2
Using /dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) align-check optimal 3
3 aligned
Checking the disk with "fdisk -l" shows me:
# fdisk -l /dev/sde
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
When the same disk is attached through a USB HDD dock, the "fdisk -l"
output gives a different value for optimal I/O size:
# fdisk -l /dev/sdb
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
=> 33553920 / 512 = 65535 sectors of 512 bytes
When I partitioned the disk, I used MiB alignment (multiple of 2048
sectors of 512 bytes each)
Is the warning from the md kernel module misleading or is parted
align-check wrong? Can the warning be made more verbose to indicate why
it believes the partition is not aligned correctly?
Reply to: