Score:3

fdisk disk size, number of bytes and sum of all partition size does not match

in flag

I just installed a new 2T SSD drive into the server of our lab. I found the new drive using fdisk -l and here is the output

Disk /dev/sda: 1.9 TiB, 1199638052864 bytes, 2343043072 sectors
Disk model: PERC H745 Frnt  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disklabel type: gpt
Disk identifier: 2F42E7A8-F63D-41AC-A5A1-729C42FCA7EF

Device       Start        End    Sectors  Size Type
/dev/sda1     2048    1050623    1048576  512M EFI System
/dev/sda2  1050624    3147775    2097152    1G Linux filesystem
/dev/sda3  3147776 2343041023 2339893248  1.1T Linux filesystem

You can see that, very interestingly, it says the total size of the disk is 1.9T, which is correct. It then follows by saying 1199638052864 bytes, which is equal to 1.2T (!= 1.9T). Also, the sum of the three partitions is also 1.2T. Why this mismatch? Why is my 2T drive reported and used as 1.2T?

terdon avatar
cn flag
Note that it says the size is 1.9 **TiB** and not **TB**. Those are _tebibytes_ not _terabytes_. That's not enough to explain the discrepancy though.
oldfred avatar
cn flag
Is this a RAID drive or was it a RAID drive? If converted from RAID set to single drive, did you remove all the RAID meta-data? That may erase drive, so have good backups. https://unix.stackexchange.com/questions/411206/how-to-wipe-md-raid-meta
cn flag
OS flavor & version? Also could you run: `LIBFDISK_DEBUG=all fdisk -l /dev/sda`
in flag
@VXDguy Ubuntu 20.04
in flag
@oldfred How do I tell? The SSD I installed is a brand new one: https://www.amazon.com/Crucial-MX500-NAND-SATA-Internal/dp/B003J5JB12/ref=sr_1_3?crid=8XBNE0FC49JS&keywords=crucial+2tb+ssd&qid=1640123524&sprefix=crucial+2tb+ssd%2Caps%2C44&sr=8-3
oldfred avatar
cn flag
What SSD? You show sda as PERC H745 Frnt which when I looked it up was normally a RAID drive. If new SSD is SATA it should be sda or sdb, depending on which port you plugged it into. Drives are normally in SATA port order. Often SSDs need firmware update even if new. And UEFI/BIOS may also need firmware update.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.