I’ve come to the point where I’ve had a drive fail and I need to get a replacement so that I can have a hot spare again.
I did some initial research and it seems ti indicate that I can mix 4K native and 512e drives in the same pool. That is with the caveat that the “ashift” for the pool is set to 12 (and mine is)
That research also indicated that I might be able to reformat a 512e drive to be a 4K native drive.
512e and 4Kn can be mixed in the same vdev, since the ashift value of “12” (4K writes) is set at pool creation. Both drives will receive and handle 4K writes transparently.
AFAIK then it should not be a problem. ashift 12 == 4k.
AFAIK a 512 drive has no problem handling 4k.
Most likely, it isn’t even a real 512 drive but like you wrote, a 512e drive.
The other way would obviously not be possible. Would your 512e drive perform slightly faster for a 4k pool, when changed into 4k? Probably slightly.
I was referring to FreeNAS/TrueNAS, which does this at pool creation. The user has no choice.
I believe it was originally hardcoded to set ashift to “9”, but that was early in the FreeNAS days before my time. They justified the hardcoded default of 12 because it is compatible with 512e and is “4Kn ready”. Basically, it doesn’t matter what drives you’re using.
Welp, my VDEVs have ashift=12, and the drives – 9. I even thought of making a test with adding formatted 4Kn drive to the existing VDEV. But now it is not needed.
Same for me. From my dusty knowledge about this topic, this is fine and actually to be expected. But I might be very outdated and/or horrendously wrong here.
I might be wrong, but the “ashift” reported for individual drives is irrelevant. All that matters is the vdev. If the drive reports 512-byte sector size (logical), you will see ashift=9 when querying it with the zpool command. If you’re using 4Kn drives, formatted to a 4-KB sector size, it will report them as ashift=12.
All mine are, but that’s only because I had the opportunity to format them (Seagate Exos) with SeaChest. Since there was no data on them, I went ahead and formatted them as 4Kn just because “why not”.
It’s for the same reason I flash a laptop’s BIOS to the latest version, even if I don’t need to.
Interesting. I underestimated the community. I never optimised that far outside of work. I buy 4Kn drives but most of them are 512e and I never bothered to flash them. Might try one that is still in warranty to test
Not that long ago I would have had to decide at purchase if I wanted a 512e or 4Kn drives so if you went 4Kn thats how they came formatted. More recently pretty much all HDDs are 4Kn but often come formatted 512e for cross-compatibility in some legacy systems. I just make the decision that my systems are not legacy and therefore use the 4Kn format.
It’s also nice to see in SMART it’s fully provisioned.