I have just received my Seagate 18TB IronWolf Pro HDD and the specs say that the logical sector size is 512 emulated. Moreover, Seagate says that switching to 4096 sector size is as easy as doing a quick format (Windows terminology?). I suppose on Linux this simply means creating a filesystem with that block size? For instance mkfs.ext4 -b 4096 /dev/device or - in my specific case - cryptsetup luksFormat --sector-size=4096 and then creating a file system?

What confuses me is the Arch Wiki article on advanced format that has instructions on how to use hdparm to tell the firmware to use a certain sector size.

Do I need to do the hdparm thing, which seemingly conflicts with the Seagate instructions?

  • bizdelnick@lemmy.ml
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    4 hours ago

    TL;DR: Everything should work well with default settings, no special actions required.

    First of all, partitions must be aligned to sector size (multiples of 4096). Most partitioning tools align partitions to 1MiB by default nowadays, so this shouldn’t be a problem, however if the disk is already partitioned, check the partition offset. For ext4, as well as most modern filesystems, default block size is 4KiB, so you don’t need to pass optional parameters to mkfs. For cryptsetup luksFormat there are also two things that must be set correctly: --align-payload (2048 512-byte sectors by default, equal to 256 4096-byte sectors, no need to change), and --sector-size (for 512e device it should be set to 4096 bytes automatically, no need to set manually).

    • printf("%s", name);@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      Sweet! I feel this kind of “proves” Seagate’s stance, in other words, that a quick format will suffice, since most tools these days defualt to 4096 byte sectors. Although one has to read between the lines a bit…

      Thanks for your help!

      • non_burglar@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        3 hours ago

        Except for leaving things default, almost none of that comment is true.

        4k is default for most disks today. Some transition-era ssds used 8k blocks.

        Do not worry about emulated block size, because ssds only use that to report to the filesystem, no sectors exist on solid state media.

  • mangaskahn@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    6 hours ago

    Use sg_format to run a low level format on the disk. 512E vs 4kN isn’t going to change much in a homelab environment. If you create a filesystem with 4k clusters, Linux will send 4k wrudte blocks to the disk. The firmware on the disk will write that out into 8 logical disk sectors, usually in a single 4k physical sector. I use my storage mainly for media and there’s no performance difference between my 512E disks and my 4nN disks. I simply don’t have an intense and sensitive enough environment to show the performance gain. I’d say leave the low level formating alone and just write a filesystem on top of it with 4k blocks.

  • CallMeAl (like Alan)@piefed.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 hours ago

    No Fast Format is needed on a modern linux system with a modern filesystem. Outside of very specific tuned workloads, it won’t make any noticable difference as linux already is detecting and optimizing for the 4k physical sectors.