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