Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • Regarding using of "hdparm --set-sector-size..." - is this permanent setting? I mean is it enough to do this only once and even after the reboot the logical sector size will be as I set before reboot? Commented Jan 25, 2020 at 7:39
  • 1
    I haven't personally tested this, but I would very much expect changing the logical sector size to be a persistent setting, as it makes a pretty fundamental change to how the data is accessed. But that is one of the reasons why I'd recommend using a vendor-specific tool for that job, if one is available: if a particular disk model needs something special to make the setting persist, a vendor-specific tool would "know" for sure how to do it right. Commented Jan 25, 2020 at 9:21
  • Finally someone that answers how to do this in a NVMe disk! THANKS A LOT! Commented Jul 22, 2020 at 10:50
  • I wonder if it's such a good thing to switch to 4Kn sectors. Wikipedia states that individual applications may also have to be able to handle a drives sector size (see picture at en.wikipedia.org/wiki/Advanced_Format#512e). The linux kernel supports 4Kn since ca. 2010, but how can we be sure that there's no application left that's relying on 512e ? I just opened another post for this (unix.stackexchange.com/questions/761398/…). Trying to weight the pros and the cons of switching to 4Kn. Commented Nov 17, 2023 at 10:00
  • @ChennyStar Most normal applications read files instead of raw disk blocks, and in such cases, the disk cache within the operating system can and will easily act as an "adapter". Applications that access raw disk blocks would be e.g. disk cloning and partitioning tools, or database engines with their own disk formats. The picture you referred to is oversimplified anyway: most modern OSs will entirely bypass the BIOS except during the boot process. Commented Nov 17, 2023 at 11:20