8

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?

0

1 Answer 1

16

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:

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 Partition does not start on physical sector boundary? for that.

2
  • 1
    Thanks for the effort - well done, +1.
    – Binarus
    Dec 10, 2020 at 8:44
  • Thank you very much for your answer. Sorry for not acknowledging for so long. I have no excuse. I'll be better in the future. Thanks again.
    – Mark W.
    Dec 10, 2020 at 20:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .