Hoping this is the right spot for this, but if not I apologize…
TL/DR: Does TrueNAS support 520 sector drives currently? If not, are there any plans to support it in the future? If it doesn’t support it, and there is no plan to support is, why?
I basically have a curiosity that I’m hoping to figure out, or at worst case, hopefully be taken as a feature request of some sort if its not already implemented.
Basically, is there currently support for drives with a sector size of 520? And if not, are there any plans for it to be implemented? I only ask because it seems as if this is some sorta ‘taboo’ of the storage world, where no one will touch 520 sectors with a 520 foot pole lol. This always seemed odd to me, as so many drives out there are 520 sectored…
I personally have like, 100+ Dell branded Intel SSDs that have 520 sector sizes. I got them from work when we decommissioned an EMC storage vault… and would love to be able to use them. However they’re SATA style, and thus you cannot simply use sg_utils or the cam-something commands to simply resector them…
I have been rockin TrueNAS Scale for about a year or two now, and the thought to maybe be able to include these SSDs into my pools somehow just crossed my mind. I’ve had them for about 6 months to a year maybe, but just figured they were useless junk since they’re stuck at 520 sectors… I had thought about just selling them, but that seemed kind of like a dick move to whomever would buy them, as they’d also not be able to use them for legitimately anything… and then they’d turn around and just leave a bad review saying I sold them bad drives just because the sector size is wrong lol…
If 520 sectors are not supported currently, is there any real explanation as to ‘why’ that is? I understand 512 is ‘consumer’ spec, but at the same time, it doesn’t seem as if it would be too unreasonable to expect a storage solution that touts itself as being ‘enterprise grade’ to support an ‘enterprise’ spec. ProxMox supports several ‘enterprise’ specs even within its ‘free for consumer’ version. So it just seems kind of silly to me to not have support for 520 for those niche enterprise drives.
Oversimplifying here, but ZFS does larger/smarter checksums (256-bit by default, 512-bit optionally) and then stores that checksum away from the data, so we can tell when things have gone missing or awry that way.
And there should be a way to blast those drives back into 512B format, even if they’re SATA. You’ve tried the usual sg_format I assume? Got a model number?
So its basically because ZFS is just better at it than other typical file systems then?
And the problem with them is that sg_utils uses commands used by SAS connections (from what i’ve gathered anyway), and these drives straight up reject any SAS commands. Nothing I’ve found works at all with them.
Also, double checking the drives themselves, they appear to actually be Samsung, and not Intel. However here is what’s on the front of the drive:
Oof, Samsung. I think I tried to play with these in a former life and they stubbornly refused to behave. What’s the error you get from trying to sg_format --format --size=512 -v /dev/sdX one of them?
My TrueNAS Scale box is entirely built with SAS SSDs reclaimed from a Netapp system (Samsung SM1633 disks). They were 520 byte sectors, but I reformatted them all to 512-bytes sectors and they work just fine in “normal” server hardware now.
The command I used was sg_format -v --format --size=512 /dev/<blah>
sg_format won’t work. It seems you need a recent version of hdparm, and this may work: hdparm --set-sector-size 512 --please-destroy-my-drive /dev/<blah>
A few things I found when trying to research this:
Try smartctl -i /dev/sg0 and see if something similar to this appears in the smartcli output: “Formatted with type 2 protection”. Obviously you will want to work out which /dev/* to use - and in this example they are using the matching raw device rather than the block device so you may want to remember that for other commands you might want to try.
Also, these seem to be SATA II drives rather than SATA III drives - so although they are SSDs their speed might not be quite as fast as you might expect. There are a LOT of them on sale on eBay but none of the listings warn you about the 520 vs 512 byte issue.
sorry for not having replied in a bit. alot of ‘shit hit the fan’ instances happened at work and i’ve been basically living there for the past week… I’ll give the above suggestions a try once i can, however now I’m having severe TrueNAS Stability Issues that legit just started today, where the OS just reboots itself the moment any sort of large data transfers happen over NFS… its, getting kinda frustrating lol.
But like i said, I’ll def give this a shot once i have the ability! Thank you.
Art of Server made a video about fixing enterprise drives that had 520 sector size. You might check that out. I think SAS may have been included. SSD’s were.
Pretty sure I’ve watched this video before, and it doesn’t help. The issue is that the SSDs specifically do not respond to any of the commands. just says that an error occurred. later researched showed that SATA drives do not follow the same commands as SAS drives, which the sg_utilts works with SAS commands. Some SATA drives ‘can’ work with SAS commands, which is why it generally works for most things, but there are some SATA drives that use proprietary instruction sets, which do not respond to any external commands other than read and right. But I could be misunderstanding those articles/posts.
I’m at work currently, and after doing server maintenance (which went way too fast for my liking…) i’ve got some time to try and fool around with these drives again. So i’ll give some of the things that were posted above a shot and see if they work.
No Dice. Latest version of Ubuntu can’t even see the disks. Doesn’t even show up as being connected at all. I can get them to show up in windows disk management but obviously cannot initialize the disks cause of the sector size… but yea, Ubuntu can’t even detect the SDDs are there at all.
EDIT:
Yea, tried on multiple PCs here and nothing can see the drives using a USB Dock. my previous attempts were with hooking them up to an HBA, so I might have to take the drives home and use them on my disk shelf to give the hdparm a shot. Using the USB Dock just seems to constantly ‘read’ the drives, which fails, and thus doesn’t allow an OS to boot up at all if the drives are connected… where as with an HBA, the OS is just trying to see if the card is there, and not really ‘caring’ if there are drives. So we’ll give that a shot.
OEM’s tend to do some stupid stuff with some of their equipment and drives supposedly to make it “better”, but it’s just to lock you into their ecosystem.
The Drives are not by chance locked are they? There may have been a password set through the Dell BIOS on the drives in the machine they were originally in preventing interaction with the drive outside of that machine. If smartctl -x won’t read the drives they may be locked hdparm may help and you may have some luck with sg3_utils sg_scan -i to see if you can get some info.
Any interaction or fixing is very likely to come from the linux command line so it’s best to boot a server with the drive(s) installed on a backlane or install a few to an HBA. Use a live linux environment (distribution) to work from where tools are available or can be installed.