USB External Hard Disks Appear Smaller

From Leo's Notes
Last edited on 30 December 2021, at 02:04.

I have a few Seagate USB 3.0 SATA controllers which I obtained by shucking a few 8TB external hard drives. While attempting to use them as an automated backup solution with a Raspberry Pi, I noticed that some drives which were partitioned on a real computer couldn't be mounted.

For some reason, hard drives connected to these Seagate USB SATA controllers appear a sector smaller. Partitions using the legacy MBR that run to the end of the disk 'lose' a sector of space which some filesystems don't like. Additionally, the partition will appear as corrupt and might not even show up with lsblk because the partition exceeds the size of the disk. When attempting to mount such a partition, the kernel spits out the following message:

[ 4147.344005] EXT4-fs (sdd1): bad geometry: block count 488378390 exceeds size of device (488378389 blocks)

The workaround I've sort of walked myself into is to use GPT. One small benefit with using GPT is that the partition table is written to both the start and the end of the disk. The additional copy at the end of the disk inadvertently acts as a sort of buffer and allows for partitions that span the full size of the disk to continue to mount at the expense of a corrupt second GPT partition table.

See Also[edit | edit source]