Why same disk model but different capacity?
I'm trying to replace an old disk on a JBOD that I inherited. I bought exactly the same model but it seems it has a different capacity (resulting from different number of disk sectors), preventing me from resilvering the disk.
I don't see any difference besides the date of manufacture that could cause this. What could cause this?
New disk:
$ smartctl -a /dev/sdfk
User Capacity: 7,865,536,647,168 bytes [7.86 TB]
Vendor: HGST
Product: HUH728080AL5204
Revision: NE00
Manufactured in week 13 of year 2016
$ fdisk -l /dev/sdfk
Disk /dev/sdfk: 7865.5 GB, 7865536647168 bytes, 15362376264 sectors
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Any other disk in JBOD:
$ smartctl -a /dev/sdfl
User Capacity: 8,001,563,222,016 bytes [8.00 TB]
Vendor: HGST
Product: HUH728080AL5204
Revision: C7J0
Manufactured in week 39 of year 2015
$ fdisk -l /dev/sdfl
Disk /dev/sdfl: 8001.6 GB, 8001563222016 bytes, 15628053168 sectors
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Edit
As requested, hdparm
seems to be the same for both disks:
$ hdparm -N /dev/sdfk
/dev/sdfk:
SG_IO: bad/missing sense data, sb[]: 72 05 20 00 00 00 00 34 00 0a 00
00 00 00 00 00 00 00 00 00 01 0a 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]: 72 05 20 00 00 00 00 34 00 0a 00
00 00 00 00 00 00 00 00 00 01 0a 00 00 00 00 00 00 00 00 00 00
$ hdparm -N /dev/sdfl
/dev/sdfl:
SG_IO: bad/missing sense data, sb[]: 72 05 20 00 00 00 00 34 00 0a 00
00 00 00 00 00 00 00 00 00 01 0a 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]: 72 05 20 00 00 00 00 34 00 0a 00
00 00 00 00 00 00 00 00 00 01 0a 00 00 00 00 00 00 00 00 00 00
Having recently encountered this myself, I can definitively say it's because of sector sizing.
I have a similar model as yours, HUH721008AL5204, and this is fdisk report before reformat.
Disk /dev/sde: 7.15 TiB, 7865536647168 bytes, 15362376264 sectors
Disk model: HUH721008AL5204
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
And this is after.
Disk /dev/sde: 7.28 TiB, 8001563222016 bytes, 1953506646 sectors
Disk model: HUH721008AL5204
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
To switch from 512 byte sectors to 4096 byte sectors, I used this command. It typically only works with SAS drives, not SATA. Some SATA drives do support changing sector size using hdparm or vendor supplied tools, but I've always had bad luck with it.
sudo sg_format --size=4096 --format --fmtpinfo=0 /dev/sde