Does LBA size map to the physical or logical sector size on hard disks?

Solution 1:

Logical.

Note LBA stands for Logical Block Addressing. This corresponds nicely in this case, but until you know the technical details you cannot be sure if usage of the same word is not misleading.

If physical and logical sector sizes are equal, there is no question. You work with a device using its "sector size". The terms "logical sector size" and "physical sector size" may not exist, "sector size" is enough.

And it would still be enough even with 4096-byte (or any other) sector size if operation systems and programs always queried devices to learn their sector size and if they were ready to accept values other than 512 bytes.

But because 512-byte sector size for ATA HDDs was standard, common, "carved in stone" and "always like this", it was relatively safe to assume it's like this without querying the device. I'm not sure all devices can be queried for their sector size (and I'm thinking especially about old devices). I won't be surprised if some devices assume you assume their sector size is 512 bytes and there is no point in querying them, so they don't support querying them.

You could even hardcode the value of 512 bytes and it would work with ATA drives back then.

Things got complicated when hard disks started to use sectors of 4096 bytes internally, physically. If software always queried devices for their sector size and adjusted to the response then new disks could simply respond with 4096 and carry on. The sole concept of "sector size" would still be enough.

But because many pieces of software were not ready for this, 512e was introduced. By using logical sector size of 512 bytes it disguises itself as an old disk. It's like it says: 'Treat me like an old disk, talk to me in terms of 512-byte sectors you assume I support; I will handle the rest'.

And this is exactly what should happen. You talk to such disks in terms of 512-byte sectors. You talk to them using their logical sectors. The disk will handle conversion to its larger physical sectors internally.

Note your question arouse because you are aware "logical" and "physical" can be different. Old software in general is not aware, it doesn't care. The whole point of 512e is to present sectors of 512-bytes to the outside to satisfy software that wouldn't work otherwise.

Still it's good to know the physical sector size and this is why hard disks report both "physical" and "logical". See What's the point of hard drives reporting their physical sector size? Old software that doesn't care may achieve sub-optimal performance with 512e disks, but at least it works.