Extending stripe to mirror, potential size discrepancy issue?

oblivioncth

Explorer
Joined
Jul 13, 2022
Messages
71
I have a single drive stripe pool that I'm using for my system dataset and a single VM. It is a 2TB NVMe drive.

As we all obviously know, generally disk sizes are advertised as TB, not TiB, so usually a 2TB drive would be 2,000,000,000,000 bytes, plus some change (though I'm not privy to the reason for this, I'd say HPA, but I believe that's invisible to the OS).

This is seen with a 2TB NVMe drive on my desktop:
1675295267272.png


However, when I look the 2TB drive I referred to early in TrueNAS, to my surprise I see this:

1675295318753.png


It's almost like its following the Base10 rule up to gigabytes, and then the Base2 rule for terabytes. I've seen a few disks advertised as having a capacity of 2.048TB, so I'm wondering if this is basically one of those even though it was advertised as 2TB.

The second disk shown (one in TrueNAS) is using 4K sectors, while the first is using 512, but as far as I know this shouldn't change the total capacity at all.

I'm assuming that if I go an buy a different 2TB NVMe drive to pair with this one for the mirror and it ends up being the kind with a capacity of roughly 2,000,000,000,000 bytes, like in the first picture, I won't be able to use it to extend the current vdev because of the size difference? I think I'd have to repartition the current drive to match the slightly smaller space of the new one, which I'm not totally sure how to do safely given it has existing data.

I know that if I was using these drives from scratch the difference wouldn't matter, and that if I started with a slightly smaller drive and was adding a slightly bigger one to make it a mirror it wouldn't matter, but am I correct that I'd be in trouble if what I just described turns out to be the case?
 

bcat

Explorer
Joined
Oct 20, 2022
Messages
84
Modern drive sector counts appear to be governed by SFF-8447 (which updates the older LBA1-03 standard to include "high capacity" drives with greater than 8 TB nominal capacity).

Looking at the formula on page 10 of SFF-8447 ("LBA Counts from Advertised Capacity for 4096 Low Capacity Disk Drives"), a 2.048 TB SSD using 4096-byte logical sectors should have 12212046 + 244188 * (2048 - 50) = 500099670 sectors, which is indeed what your second screenshot shows.

So yes, it looks like you have a 2.048 TB SSD, not a 2 TB one. :) And presumably if you wanted to mirror it, you'd want to get another 2.048 TB SSD to match.

I'm curious what the drive's spec sheet says. Even if the box says "2 TB", I think the actual SSD spec should say "2.048 TB" (or equiv, "2048 GB").
 
Last edited:

oblivioncth

Explorer
Joined
Jul 13, 2022
Messages
71
Modern drive sector counts appear to be governed by SFF-8447 (which updates the older LBA1-03 standard to include "high capacity" drives with greater than 8 TB nominal capacity).

Looking at the formula on page 10 of SFF-8447 ("LBA Counts from Advertised Capacity for 4096 Low Capacity Disk Drives"), a 2.048 TB SSD using 4096-byte logical sectors should have 12212046 + 244188 * (2048 - 50) = 500099670 sectors, which is indeed what your second screenshot shows.

So yes, it looks like you have a 2.048 TB SSD, not a 2 TB one. :) And presumably if you wanted to mirror it, you'd want to get another 2.048 TB SSD to match.

I'm curious what the drive's spec sheet says. Even if the box says "2 TB", I think the actual SSD spec should say "2.048 TB" (or equiv, "2048 GB").
Awesome resource!

The first link is broken as it shows a local file (borked upload?), but I Google'd it nonetheless. Good to know I'm not crazy and that there's a well defined configuration that this drive follows, even if it is an odd and annoying amount.

Even though Sabrent makes pretty good consumer drives, they're device information is garbage. AFAICT they have no real spec sheets publicly available to speak of, and even getting TBW or MTBF numbers for their drives is surprisingly hard :/. The only thing you can find is the capacity listed on their site and everywhere the drive is being sold as simply "2TB". Heck, even the model number for this one is pathetic, it's simply "SB-ROCKET-2TB". Barely more than just slightly condensing the product name.

It seems like 2.048TB is fairly uncommon, as I only see a few Intel and Kingston drives that are advertised as such, at least with a basic search. That or more than just Sabrent broke the rules and are miss quoting their capacities. Most users aren't utilizing their disks in a workload where matching the sizes perfectly matters, let alone with consumer drives, so I could see why they might not care.

So I guess I either need to get one of those, or another of this exact model...

EDIT:
This random Italian website shows the actual size pffff. https://www.idealo.it/confronta-prezzi/6556532/sabrent-rocket-nvme-2tb-m-2.html
1675398132409.png


This site also claims that the Samsung Evo 970 Plus 2TB model is actually 2048GB. That drive actually has a proper datasheet and it too just simply states "2TB" with no clarification anywhere. Nice...

EDIT2:
Got someone on reddit to confirm that the Samsung Evo 970 Plus 2TB is actually 2TB and not 2048GB, so this whole thing is a mess.
 
Last edited:

bcat

Explorer
Joined
Oct 20, 2022
Messages
84
Oops, fixed the link. Thanks!

Yeah, just some more anecdata, but I checked a bunch of consumer SSDs around the house, and multiple brands (Samsung, Seagate, ADATA) of 1 TB and 2 TB SSDs are all literally 1000 GB and 2000 GB, not 1024 GB and 2048 GB. So I think Sabrent might be the odd one out here, at least as far as commonly sold/frequently discounted consumer NVMe drives go....

I can also back up the statement that the Samsung Evo 970 Plus 2TB is 2000 GB (with the expected number of sectors per SFF-8447), as it's the primary drive in the system I'm typing this post on. :)
 

oblivioncth

Explorer
Joined
Jul 13, 2022
Messages
71
Yeah, just some more anecdata, but I checked a bunch of consumer SSDs around the house, and multiple brands (Samsung, Seagate, ADATA) of 1 TB and 2 TB SSDs are all literally 1000 GB and 2000 GB, not 1024 GB and 2048 GB. So I think Sabrent might be the odd one out here, at least as far as commonly sold/frequently discounted consumer NVMe drives go....
Annoying, but yea you're probably right.

I can also back up the statement that the Samsung Evo 970 Plus 2TB is 2000 GB (with the expected number of sectors per SFF-8447), as it's the primary drive in the system I'm typing this post on. :)
Lol, funny coincidence, could have just asked you.

I ended up getting a Kingston ‎SKC3000D/2048G, even though I was hoping to spend a little less just so I could be done with it. I'm actually about to install it momentarily. Hopefully the mirror lasts long enough that by the time I need to replace them, 2TB NVMe's that aren't crap (i.e. QLC with no DRAM cache) are so cheap that it won't be a big deal to just replace both of them. If I ended up alternating as each one ages then I'd be trapped into the 2048GB "game" forever.
 
Top