I have a Western Digital 4TB drive (WD40PURZ). It appears that the recommended procedure for partitioning the drive results with: "Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)" warning from the linux kernel. Should I be concerned about that?
1 Answers
I have a similar drive, the WD20EFAX-68FB5N0, accessed through UAS. I am not 100% sure, but after reading the links below I think this line in itself is no reason for concern. It seems it actually indicates the kernel you use has an important fix.
It seems it is caused by the drive incorrectly reporting an optimal transfer size of 0xFFFF, which if you multiply it by 512 bytes is 33553920 bytes. The Linux kernel does a sanity check on that value and in this case concludes it must be incorrect because it is not a multiple of the drive's physical block size of 4096 bytes. Therefore, the kernel ignores the reported optimal transfer size and reports that by logging the line you mentioned:
Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
Probably when you run lsblk -t
, OPT-IO
is now reported as 0
.
# lsblk -t
NAME ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE RA WSAME
sdb 0 4096 0 4096 512 1 mq-deadline 60 128 32M
├─sdb1 0 4096 0 4096 512 1 mq-deadline 60 128 32M
└─sdb2 0 4096 0 4096 512 1 mq-deadline 60 128 32M
Before the Linux kernel implemented this sanity check, the wrong optimal transfer size actually led to partitioning tools choosing wrong partition start locations, see http://gparted-forum.surf4.info/viewtopic.php?id=17839
The sanity check was introduced and also backported to some older kernels around February/March 2019:
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.1&id=a83da8a4509d3ebfe03bb7fffce022e4d5d4764f
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.19.13&id=852a4ab292bbc878eb137cbc2197b7282c71ba5e
A further improvement was made in March 2020:
If you created partitions before that time, you can use fdisk -l
to see if their start locations are divisible by 8 (sectors of 512 bytes) or 4096 (bytes). Normally fdisk -l
will complain quite clearly about partitions not starting on the physical sector boundary. See How to fix "Partition does not start on physical sector boundary" warning? for that.

- 336
-
1Thanks for the effort - well done, +1. – Binarus Dec 10 '20 at 08:44
-
Curious. I found https://lore.kernel.org/all/729da4d4-2bda-2330-dc3b-01f09973f9bd@gmail.com/ before reading your post. Seems the patch in this links is from March 2020. – Gen.Stack Feb 15 '24 at 15:17
-
@Gen.Stack Seems the March 2020 patch https://lore.kernel.org/all/20200324154747.29295-1-martin.petersen@oracle.com/ further improved the code that was added with the patches of 2019. I can't immediately tell if the patches of 2019 were insufficient for all devices or only for a subset. Anyway, I included it in the answer now. Thanks! – Peter Nowee Feb 15 '24 at 17:59