home | list info | list archive | date index | thread index

Issue with "corrupted disk"?

Good after-noon,

I have a problem that I never encountered:
I built a new computer on which I installed Ubuntu server 20.04. This
computer replace another computer that ran Ubuntu server 18.04. This old
computer had a ZFS pool. I exported the pool then I transfered the 6 disks
of the array from the old computer to the new computer. I tried to import
the array and got a message saying "One or more devices contains corrupted
data."
I checked the partition table of the faulty drive and parted returned
"Error: Both the primary and backup GPT tables are corrupt.  Try making a
fresh table, and using Parted's rescue feature to recover partitions."
After some googling I checked the identity information and found the
problem:

charles@paris:~$ sudo hdparm -N /dev/sda
/dev/sda:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 04 51 40 01
21 04 00
00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 04 51 40 01
21 04 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
max sectors   = 16016012464/1(1?), HPA setting seems invalid (buggy kernel
device
driver?)

It seems the number of sectors reported is wrong for a 6TB drive (this is a
WD Red 6TB). It should be 11721045168.
smartctl report an incoherence between the identity of the drive and its
reported size:

charles@paris:/var/log/snort$ sudo smartctl -a /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-109-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
Warning! Drive Identity Structure error: invalid SMART checksum.
=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Red
Device Model:     WDC WD60EFZX-68B3FN0   !
Serial Number:    WD-C812PE5G
LU WWN Device Id: 5 0014ee 269593ef3
Firmware Version: 81.00A81
User Capacity:    8,200,198,381,568 bytes [8.20 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5640 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu May 12 14:37:59 2022 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

I tried to fix the number of sectors by reseting it with:
charles@paris:~$ sudo hdparm -Np11721045168 --yes-i-know-what-i-am-doing
/dev/sda

/dev/sda:
 setting max visible sectors to 11721045168 (permanent)
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 04 51 40 01
21 04 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 04 51 40 01
21 04 00 00 a0 af 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 04 51 40 01
21 04 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 04 51 40 01
21 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 max sectors   = 16016012464/1(1?), HPA setting seems invalid (buggy kernel
device driver?)

But to no avail. I thought the disk may have been faulty so I ordered a new
one (a Toshiba N300 6TB) and replaced the WD. I had the exact same problem
of a wrongly reported number of sectors right after the 1st boot with the
drive:
charles@paris:~$ sudo hdparm -N /dev/sda
/dev/sda:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 04 53 40 01
21 04 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
max sectors   = 16016012464/11721045168(1?), HPA setting seems invalid

To me it seems like maybe a bad SATA port on the motherboard. Could it be?
Would it cause this kind of issue? Has anybody faced this?
Is it possible to save the 2 disks for which the number of sectors is
wrong? I spent many hours googling about it but couldn't really find a way.
If you ave any suggestion to recover these disks, let me know.
thanks!

Charles
-- 
Charles Nadeau Ph.D.