Score:0

Linux: 1 TB HDD showing 7 TB partition!

hr flag

I replaced a 1 TB HDD (which holds a single EXT4 partition with lots of hardlinks to backup files/directories also inside this partition. It has also a bunch of regular files/directories) with a 2 TB HDD and now I'm trying to copy the former's data back into the new disk from an external HDD reader. Unfortunately it seems the old disk didn't like to be dragged out home and now it refuses its only partition to be mounted.

gdisk /dev/sdf1 shows:

GPT fdisk (gdisk) version 1.0.6

Warning: Partition table header claims that the size of partition table
entries is 0 bytes, but this program  supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Warning: Partition table header claims that the size of partition table
entries is 0 bytes, but this program  supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present

Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.

Warning! Secondary partition table overlaps the last partition by
1709333071 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sdf: 244190646 sectors, 931.5 GiB
Model: 003-1SB102
Sector size (logical/physical): 4096/4096 bytes
Disk identifier (GUID): 0B823749-13F7-4A4E-A8C4-F4F507A94A79
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 5
First usable sector is 6, last usable sector is 244190640
Partitions will be aligned on 256-sector boundaries
Total free space is 2042 sectors (8.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
1            2048      1953523711   7.3 TiB     8300  Linux filesystem

What puzzles me is both the strange secondary partition table and the unreal 7.3 TiB claimed at the end of the report. The disk was performing ok before been taken out and even now, being connected by external means, smartmontools shows no issues with its health.

FURTHER INFO:

I guess the problem is related to having swapspace service enabled on that partition when the disk was operating. testdisk utility detects several swap partitions which I guess to be the swapfiles that swapspace creates to hold swap data. Maybe these fake "partitions" are confusing gdisk to believe there are 7 TB of disk space...

Any ideas / guidance?

Antonio

Score:0
hr flag

Finally it was all due to some kind of incompatibility of the HDD reader indeed! As soon as I reconnected the HDD to an inner SATA port it was inmediately recognized.

For the record, the HDD reader was an ALL IN 1 HDD DOCKING (MODEL 875) and the corresponding lsusb command output:

ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
I sit in a Tesla and translated this thread with Ai:

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.