I believe this is the same question as Optimizing logical sector size for physical sector size 4096 HDD but that question never got an accepted answer and the existing answers dance around the core question.If I have an advanced format HDD/SSD that I know has a physical sector size of 4K, AND I know that all the hardware/software on my system can handle a minimum I/O size of 4K, AND I'm OK with the marginal loss of free space for files smaller than 4K, THEN is there a way for me to set it up so that all components of the system view that device has having both a logical and physical sector size of 4K?I'd expect a solid answer to this question to include information about (1) what info the disk reports to the kernel, (2) whether the kernel unconditionally and truthfully reports that info via /sys or whether it can be made to conditionally adjust the values reported, (3) whether components other than the kernel might directly interact with the hardware and discover this information.An answer I'd accept begrudgingly is that there's no way (short of patching the kernel) for #1 to be achieved and therefore the best you can do is ensure your filesystem block size is 4K and is aligned and then call it a day.
Can the logical sector size be set on newer HDD/SSDs?
hard disk;ssd;block device