Bug 2225137 - Disk attached via usb/sata adaptor shows reduced capacity
Summary: Disk attached via usb/sata adaptor shows reduced capacity
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 37
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-24 11:29 UTC by Maximilian Reininghaus
Modified: 2024-01-15 12:19 UTC (History)
16 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-01-15 12:19:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Maximilian Reininghaus 2023-07-24 11:29:09 UTC
I have a 4TB SATA harddrive attached as external drive in a USB (2.0) casing that features a SATALink SPIF225A adaptor IC. It shows up (e.g. in gparted) as having only 2 TB (1.64 TiB). When attaching the drive directly via SATA on another Linux system, the correct size is reported.

I am not really sure where the root of problem lies. Perhaps the IC doesn't support big HDDs at all (the casing is >10 yr old after all), perhaps it's a driver/kernel module issue.

Note that this does not seem to be a problem of MBR vs. GPT partition tables.

Reproducible: Always

Steps to Reproduce:
1. put 4TB HDD into USB casing
2. attach via USB
3. check disk size
Actual Results:  
disk size reported as 2 TB (1.64 TiB)

Expected Results:  
disk size reported as 4 TB

# uname -a                                                                                                                                                                                                
Linux dyn-dhcp-141-52-66-132.iap.kit.edu 6.3.12-100.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul  5 20:09:58 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

# smartctl -x /dev/sdb
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.3.12-100.fc37.x86_64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate BarraCuda 3.5 (SMR)
Device Model:     ST4000DM004-2CV104
Serial Number:    WFN8AV46
LU WWN Device Id: 5 000c50 0f1e0d3e4
Firmware Version: 0001
User Capacity:    4.000.787.030.016 bytes [4,00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5425 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is:    Mon Jul 24 12:19:04 2023 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM feature is:   Unavailable
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, NOT FROZEN [SEC1]
Wt Cache Reorder: Unavailable


# lsblk -o "NAME,MAJ:MIN,RM,SIZE,RO,FSTYPE,MOUNTPOINT,UUID"
[...]
sdb                                             8:16   0   1,6T  0                        
[...]


# hdparm -I /dev/sdb                                                                                                                                                                                      :(

/dev/sdb:

ATA device, with non-removable media
	Serial Number:      �@
Standards:
	Likely used: 1
Configuration:
	soft sectored
	head switch time > 15us
	fixed drive
	disk xfer rate <= 5Mbs
	disk xfer rate > 5Mbs, <= 10Mbs
	data strobe offset option
	format speed tolerance gap reqd
	Logical		max	current
	cylinders	17218	0
	heads		0	0
	sectors/track	128	0
	--
	bytes/track: 512	bytes/sector: 0
	Logical/Physical Sector size:           512 bytes
	device size with M = 1024*1024:           0 MBytes
	device size with M = 1000*1000:           0 MBytes 
	cache/buffer size  = unknown
Capabilities:
	IORDY not likely
	Cannot perform double-word IO
	R/W multiple sector transfer: not supported
	DMA: not supported
	PIO: pio0 

# lsusb
[...]
Bus 001 Device 003: ID 04fc:0c25 Sunplus Technology Co., Ltd SATALink SPIF225A
[...]

Comment 1 Hans de Goede 2023-08-14 08:09:04 UTC
This sounds like your USB SATA enclosure is not capable of handling disks > 2TB .

Esp. this part is interesting (if correct):

SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 1.5 Gb/s)

1.5 Gb/s is SATA 1 so that is a really old enclosure (or it somehow does not like the disk), which likely is limited to 32 bit sector addresses instead of 48 bit sector addresses like newer enclosures.

32 bit sector addresses limit the addressable range to 2TB (512 * 4 * 10^9), so the enclosure is likely capping the reported size to the addressable range.

Comment 2 Aoife Moloney 2023-11-23 01:48:11 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Aoife Moloney 2024-01-15 12:19:39 UTC
Fedora Linux 37 entered end-of-life (EOL) status on 2023-12-05.

Fedora Linux 37 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.