Elektrine lite

← Feed

@akunohana@piefed.blahaj.zone

Post #4009565

2026-07-22 10:21 UTC

Format a 512e drive to 4096 on Linux 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?

Replies (5)

  • @mangaskahn@lemmy.world 2026-07-22 11:16

    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.

    Open ##4010572

  • @CallMeAl@piefed.zip 2026-07-22 11:20

    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.

    Open ##4010645

  • @bizdelnick@lemmy.ml 2026-07-22 13:08

    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).

    Open ##4012656

  • feedback Thanks for all the advice! Here’s some funny feedback: it was a faulty drive 🤣 give me back my feelings 😭 obviously I’m sending it back

    Open ##4018239

  • @mvirts@lemmy.world 2026-07-23 05:51

    Totally unrelated, but I just want to say that my 14 TB sas drive (exos?) was brought back to life in a 12 TB configuration after failure by using openseachest to deactivate one side of one of the platters (the failing one, it was the only one with errors) after I told it to start it took 4 days to reformat, most of that time reporting no progress, but finally finished and now it works great!

    Open ##4028333