Search
The Best Hyperconverged Infrastructure (HCI) for Enterprise ROBO, SMB & Edge

Logical block size

Introduction

The logical block size (sector size) of a StarWind device should be selected based on the technical properties of the underlying hard disk drive(s). The logical block size should be equal to or greater than the physical block size of the drive. Information about the physical block size can be found in the technical specifications of the specific hard disk drive model.

Explanation

512 Logical ↦ 512 Physical

Most older hard disk drives with lower capacities available on the market use a 512-byte physical block size. Choosing a 512-byte logical block size in this case provides direct correspondence with the underlying storage, ensuring optimal performance and storage utilization.

4096 Logical ↦ 4096 Physical

For newer hard disk drives operating in native 4K mode, there is no emulation layer in place. The disk media directly exposes its 4096-byte physical sector size to the system firmware and operating system. That way, the externally visible logical sectors organization of the 4K native drives is directly mapped to their internal physical sectors organization. Choosing 4096 logical block size, in that case, provides direct correspondence with underlying storage giving the best performance and storage utilization.

4096 Logical ↦ 512 Physical

Using a 4096-byte logical block size on 512-byte physical sectors may slightly reduce overall performance, as data is generally processed in 512-byte segments. However, most operating systems use a 4096-byte block size.

512 Logical ↦ 4096 Physical

Most 4K drives present a logical sector size of 512 bytes, even though the physical sector size is 4096 bytes. This is done through juggling data in the drive’s firmware, and it can result in performance issues or errors if the logical block size is not properly aligned.

4K drives that do not support 512 logical sector size will not work in that configuration. To address this limitation, StarWind added 512 block size emulation for creating iSCSI devices (LUNs) on top of 4Kn underlying storage starting from the build 15469 (find the release notes here: https://www.starwindsoftware.com/release-notes-build )

Conclusion

Selecting the correct logical block size for a StarWind device is essential for achieving optimal performance, stability, and storage efficiency. As a general rule, the logical block size should be equal to or greater than the physical block size of the underlying storage. Mismatched configurations may still function, but they can introduce performance overhead or compatibility limitations. Therefore, always verify the physical sector size of the underlying drives and choose the logical block size accordingly to ensure proper alignment and reliable operation.

Hey! Looking for a reliable, high-performance, and cost-effective shared storage solution for your production cluster?
Dmytro Malynka
Dmytro MalynkaStarWind Virtual SAN Product Manager
We’ve got you covered! StarWind Virtual SAN (VSAN) is specifically designed to provide highly-available shared storage for Hyper-V, vSphere, and KVM clusters. With StarWind VSAN, simplicity is key: utilize the local disks of your hypervisor hosts and create shared HA storage for your VMs. Interested in learning more? Book a short StarWind VSAN demo now and see it in action!