LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-31-2021, 06:48 PM   #1
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Rep: Reputation: 16
badblocks shows errors but smartctl and vendor util does not


Hello

I have external HDD Samsung (inside it is Seagate Baracuda) D3 Station 2TB contaning one NTFS patition. I've successfully cloned whole disk using ddrescue with no errors. From cloned image I can mount NTFS partition and seems that everything is fine except one file:

Code:
root@ryzen:/mnt/SAMSUNG_2TB# du -sh * | sort -h
du: cannot access 'EDU_VIDEOS/coursera/Coursera - Stanford University - Jeff Ulman - Automata/02 - Week 2 Regular Expression and Properties of Regular Languages/03 - 7. Decision algorithms for regular languages (41 min.)/7_rs1.pdf': Input/output error
dmesg shows nothing suspicious, except:

Code:
[ 1041.102751] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[ 1041.105653] ntfs: volume version 3.1.
[ 1268.754273] __ntfs_error: 6 callbacks suppressed
[ 1268.754274] ntfs: (device loop0): map_mft_record_page(): Mft record 0x1c52 is corrupt.  Run chkdsk.
[ 1268.754287] ntfs: (device loop0): map_mft_record(): Failed with error code 5.
[ 1268.754292] ntfs: (device loop0): ntfs_read_locked_inode(): Failed with error code -5.  Marking corrupt inode 0x1c52 as bad.  Run chkdsk.
Then I've done smartctl long test with following results:

Code:
root@ryzen:~# smartctl -a -d sat /dev/sdd
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.34-1-pve] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.14 (AF)
Device Model:     ST2000DM001-1E6164
Serial Number:    W1E903F0
LU WWN Device Id: 5 000c50 07d3083c7
Firmware Version: SC48
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Jan 25 08:53:36 2021 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever
					been run.
Total time to complete Offline
data collection: 		(  584) seconds.
Offline data collection
capabilities: 			(0x73) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					No Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine
recommended polling time: 	(   1) minutes.
Extended self-test routine
recommended polling time: 	( 232) minutes.
Conveyance self-test routine
recommended polling time: 	(   2) minutes.
SCT capabilities: 	       (0x3081)	SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   113   100   006    Pre-fail  Always       -       54720264
  3 Spin_Up_Time            0x0003   095   095   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       67
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   100   253   030    Pre-fail  Always       -       30065584744
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       136
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       53
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   001   000    Old_age   Always       -       7 7 65535
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   054   045   045    Old_age   Always   In_the_past 46 (Min/Max 21/53)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       6
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       765
194 Temperature_Celsius     0x0022   046   055   000    Old_age   Always       -       46 (0 20 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       56h+06m+40.808s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       846975072
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       4758693957

SMART Error Log Version: 1
ATA Error Count: 2
	CR = Command Register [HEX]
	FR = Features Register [HEX]
	SC = Sector Count Register [HEX]
	SN = Sector Number Register [HEX]
	CL = Cylinder Low Register [HEX]
	CH = Cylinder High Register [HEX]
	DH = Device/Head Register [HEX]
	DC = Device Command Register [HEX]
	ER = Error register [HEX]
	ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 2 occurred at disk power-on lifetime: 63 hours (2 days + 15 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 00 ff ff ff 4f 00      00:00:12.218  READ DMA EXT
  25 00 08 c0 05 60 40 00      00:00:12.217  READ DMA EXT
  25 00 20 ff ff ff 4f 00      00:00:12.210  READ DMA EXT
  25 00 28 ff ff ff 4f 00      00:00:12.149  READ DMA EXT
  25 00 20 ff ff ff 4f 00      00:00:11.675  READ DMA EXT

Error 1 occurred at disk power-on lifetime: 63 hours (2 days + 15 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 00 ff ff ff 4f 00      00:00:12.218  READ DMA EXT
  25 00 08 c0 05 60 40 00      00:00:12.217  READ DMA EXT
  25 00 20 ff ff ff 4f 00      00:00:12.210  READ DMA EXT
  25 00 28 ff ff ff 4f 00      00:00:12.149  READ DMA EXT
  25 00 20 ff ff ff 4f 00      00:00:11.675  READ DMA EXT

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%       132         -
# 2  Short offline       Completed without error       00%       126         -
# 3  Extended offline    Aborted by host               90%       126         -
# 4  Short offline       Completed without error       00%       126         -
# 5  Short offline       Aborted by host               70%       126         -
# 6  Short offline       Completed without error       00%       126         -
# 7  Short offline       Completed without error       00%       126         -
# 8  Short offline       Completed without error       00%       106         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
As far as I understand above output it all seems fine maybe except this line:
Code:
40 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455
which is bug in old 2.6 kernel! http://patchwork.ozlabs.org/project/...@teksavvy.com/
and I have no idea how this could happend because I'm using latest kernel.

So after this I've issued badblocks -nsv /dev/sdX -o badblocks.log
After this I got 11GB! log file full of bad blocks and no commands (fdisk, lsblk) was able to access hdd anymore. Oh, and dmesg was full of messages like those:

Code:
[153480.139575] Buffer I/O error on dev sde, logical block 3206647748, async page read
[153480.139684] Buffer I/O error on dev sde, logical block 3206647749, async page read
[153480.139790] Buffer I/O error on dev sde, logical block 3206647750, async page read
[153480.139895] Buffer I/O error on dev sde, logical block 3206647751, async page read
[153480.140004] Buffer I/O error on dev sde, logical block 3206647744, async page read
[153480.140117] Buffer I/O error on dev sde, logical block 3206647745, async page read
[153485.143004] buffer_io_error: 9681598 callbacks suppressed
So after this I've removed disk from case and connected it directly to mainboard via SATA and run again badblocks and smartctl long. The results for badblobcks are narly same as previous: badblocks reports errors bud smartctl does not. Here is output after long test:

Code:
root@ryzen:~# smartctl -a /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.34-1-pve] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.14 (AF)
Device Model:     ST2000DM001-1E6164
Serial Number:    W1E903F0
LU WWN Device Id: 5 000c50 07d3083c7
Firmware Version: SC48
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jan 29 17:38:54 2021 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.

General SMART Values:
Offline data collection status:  (0x82)	Offline data collection activity
					was completed without error.
					Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(  584) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 ( 232) minutes.
Conveyance self-test routine
recommended polling time: 	 (   2) minutes.
SCT capabilities: 	       (0x3081)	SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   116   100   006    Pre-fail  Always       -       106098520
  3 Spin_Up_Time            0x0003   095   095   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       69
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   100   253   030    Pre-fail  Always       -       42950569832
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       189
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       55
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   001   000    Old_age   Always       -       7 7 65535
189 High_Fly_Writes         0x003a   099   099   000    Old_age   Always       -       1
190 Airflow_Temperature_Cel 0x0022   066   045   045    Old_age   Always   In_the_past 34 (Min/Max 34/36)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       8
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       767
194 Temperature_Celsius     0x0022   034   055   000    Old_age   Always       -       34 (0 20 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       67h+06m+11.667s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       1100316256
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       5016214998

SMART Error Log Version: 1
ATA Error Count: 2
	CR = Command Register [HEX]
	FR = Features Register [HEX]
	SC = Sector Count Register [HEX]
	SN = Sector Number Register [HEX]
	CL = Cylinder Low Register [HEX]
	CH = Cylinder High Register [HEX]
	DH = Device/Head Register [HEX]
	DC = Device Command Register [HEX]
	ER = Error register [HEX]
	ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 2 occurred at disk power-on lifetime: 63 hours (2 days + 15 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 00 ff ff ff 4f 00      00:00:12.218  READ DMA EXT
  25 00 08 c0 05 60 40 00      00:00:12.217  READ DMA EXT
  25 00 20 ff ff ff 4f 00      00:00:12.210  READ DMA EXT
  25 00 28 ff ff ff 4f 00      00:00:12.149  READ DMA EXT
  25 00 20 ff ff ff 4f 00      00:00:11.675  READ DMA EXT

Error 1 occurred at disk power-on lifetime: 63 hours (2 days + 15 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 00 ff ff ff 4f 00      00:00:12.218  READ DMA EXT
  25 00 08 c0 05 60 40 00      00:00:12.217  READ DMA EXT
  25 00 20 ff ff ff 4f 00      00:00:12.210  READ DMA EXT
  25 00 28 ff ff ff 4f 00      00:00:12.149  READ DMA EXT
  25 00 20 ff ff ff 4f 00      00:00:11.675  READ DMA EXT

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%       187         -
# 2  Extended offline    Completed without error       00%       132         -
# 3  Short offline       Completed without error       00%       126         -
# 4  Extended offline    Aborted by host               90%       126         -
# 5  Short offline       Completed without error       00%       126         -
# 6  Short offline       Aborted by host               70%       126         -
# 7  Short offline       Completed without error       00%       126         -
# 8  Short offline       Completed without error       00%       126         -
# 9  Short offline       Completed without error       00%       106         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
I've tried Long Generic Test under SeaTools Bootable directly from Seagate. This shows no errors.

1. why does badblocks show erros when smartctl and SeaTools Bootable does not?
2. Is my drive dying (it has just few hours powered up as shown in smartctl) or do I have just corrupted FS?
3. is badblocks still relevant on new drives?

Thank you very much
 
Old 01-31-2021, 07:26 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675

Rep: Reputation: Disabled
I had similar issue with one of my RAIDZ2 drives. Mine is WD Red, it had trouble reading six sectors. I tried to force reallocation, first I attempted reading these sectors with dd, nothing, got read errors but no relocation. Then I tried to write these six sectors with dd and after that the sectors became readable again. I really have no clue what happened, I think maybe drive reallocated them, although reallocation count is still zero. I vaguely recall reading somewhere there are a few spare sectors and very first reallocated sectors just get reallocated without counting. It was live RAIDZ2 so I just let zfs to resilver it and has been running about 6 months now without problem returning. You could try and write your suspicious sectors with dd like I did.
 
Old 02-01-2021, 02:21 AM   #3
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
Thank you very much for reply

Quote:
Originally Posted by Emerson View Post
I had similar issue with one of my RAIDZ2 drives. Mine is WD Red, it had trouble reading six sectors.
How did you figured out which sectors were problematic?
Can you please post example how do you did that for some particular sector?


Quote:
Originally Posted by Emerson View Post
I tried to force reallocation, first I attempted reading these sectors with dd, nothing, got read errors but no relocation. Then I tried to write these six sectors with dd and after that the sectors became readable again.
Can you please post example how do you did that for some particular sector? How did you set dd parameters? Do you write ones or zeros?

Quote:
Originally Posted by Emerson View Post
I vaguely recall reading somewhere there are a few spare sectors and very first reallocated sectors just get reallocated without counting.
I recall something similar but as I said mine log created by badblocks has 11GB (and maybe not all sectors are mentioned here). So I guess not all sectors might be relocated from sparse HDD sectors. Because of such many sectors I guess it might be better to rewrite whole HDD either using dd or vendor tool?

Thank you
 
Old 02-01-2021, 07:22 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675

Rep: Reputation: Disabled
Your dmesg gives you block addresses. Now when I look at your post more carefully I notice you have a huge number of I/O errors, not just a few like I had. You are using foreign filesystem I have no experience with, maybe those errors you are getting have nothing to do with hard drive and everything to do with filesystem. Anyhow, to answer your question about dd usage. First command reads six sectors, second writes six sectors. It does not matter what you write, important part is whether the write succeeds or not. Same about reading, it is not important what it reads from there.
Code:
dd if=/dev/sdb of=/dev/null skip=600087 count=6 
dd if=/dev/random of=/dev/sdb skip=600087 count=6
You can use conv=noerror to keep it going.
 
Old 02-01-2021, 09:30 AM   #5
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Emerson View Post
Your dmesg gives you block addresses.
So can I use blocks addresses also from log or only from dmesg? Because of I have large number of bad blocks not everything fits to dmesg I hope log will contain more blocks.

Quote:
Originally Posted by Emerson View Post
You are using foreign filesystem I have no experience with, maybe those errors you are getting have nothing to do with hard drive and everything to do with filesystem
Hmm, I thought that badblocks is FS agnostic
 
Old 02-01-2021, 09:35 AM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675

Rep: Reputation: Disabled
Real bad blocks are, but the errors in your dmesg seem to be coming from filesystem driver. It is not true proof the underlying hard drive is bad.

Edit: In case all these errors are real hard drive errors then this drive is beyond repair and should be replaced.

Last edited by Emerson; 02-01-2021 at 10:17 AM.
 
Old 02-02-2021, 06:48 AM   #7
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Emerson View Post
Edit: In case all these errors are real hard drive errors then this drive is beyond repair and should be replaced.
This is the whole problem. I do not know if they are logical (FS) or physical (block device). And seems that only way how to figure it out is:

1. maybe rewrite whole HDD with 1 or 0
2. format device to some Linux like FS
3. start using it
4. monitor logs

Because it seems that badblocks probably cannot determine if HDD has bad blocks or not (due to underlining mechanism on new HDDs) and I'm in doubt that any other tool can (maybe except SMART, but as I read somewhere, good SMART result isn't guarantee of non faulty HDD)

Last edited by wakatana; 02-02-2021 at 06:53 AM.
 
Old 02-02-2021, 12:09 PM   #8
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
The smartctl output #1 and #7 show an enormous amount of read errors. The file system is NTFS so I doubt linux is the proper tool to use to fix it.

I would attach the drive to a windows machine and run chkdisk on it and look at the results. It may just be a corrupt file or 2, or it could be drive failure. In any case the proper tool should be used to identify it.

I also would suggest running a smartctl long test on it as well.
 
Old 02-02-2021, 12:19 PM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675

Rep: Reputation: Disabled
That's what I thought, but then I saw a recent long test passed at 132 h, current 136 h. It is possible of course that some disaster took place during last 4 hours, like spinning disk was dropped to floor.
 
Old 02-02-2021, 01:08 PM   #10
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,821

Rep: Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240
Quote:
Originally Posted by computersavvy View Post
The smartctl output #1 and #7 show an enormous amount of read errors.
Those parameters are not simple error counts, and those large numbers are completely normal.
Do a Google search for "seagate read error rate" (without the quotes) for further explanation.

Last edited by rknichols; 02-02-2021 at 01:13 PM.
 
Old 02-02-2021, 03:49 PM   #11
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by computersavvy View Post
The file system is NTFS so I doubt linux is the proper tool to use to fix it.
I know that NTFS is not the best option for Linux. But this does not explain why badblocks (which is file system agnostic) reports erros while smartctl does not.

Quote:
Originally Posted by computersavvy View Post
I also would suggest running a smartctl long test on it as well.
I've already done it, with no errors, please check my 1st post.

Quote:
Originally Posted by rknichols View Post
Those parameters are not simple error counts, and those large numbers are completely normal.
Do a Google search for "seagate read error rate" (without the quotes) for further explanation.
You're right, I understand it same way, because of this I'm saying that smartctl does not show any errors while badblocks does.
 
Old 02-02-2021, 06:50 PM   #12
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,821

Rep: Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240Reputation: 2240
Are there any relevant messages recorded in the system error log at the time when badblocks reports that error?

That failing LBA = 0x0fffffff seems rather "interesting".
 
Old 02-03-2021, 02:50 AM   #13
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by rknichols View Post
Are there any relevant messages recorded in the system error log at the time when badblocks reports that error?

That failing LBA = 0x0fffffff seems rather "interesting".
Hmm, I do not remember that I've seen something suspicious. Currently I have not access to this PC and it was shutdown meanwhile so I do not know if this log did not vanishes. I can search logs later, should I search for something specific? It was mentioned that dmesg messages are most probably FS error, are there any messages that are related to physical error?

Thanks

Last edited by wakatana; 02-03-2021 at 05:27 AM.
 
Old 02-03-2021, 11:16 AM   #14
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by wakatana View Post
Hmm, I do not remember that I've seen something suspicious. Currently I have not access to this PC and it was shutdown meanwhile so I do not know if this log did not vanishes. I can search logs later, should I search for something specific? It was mentioned that dmesg messages are most probably FS error, are there any messages that are related to physical error?

Thanks
Someone just recently posted about using ddrescue on a disk that was showing errors and found 2000+ sectors that ddrescue was unable to access. Definitely bad blocks even though smartctl showed 0 relocated sectors. Maybe you could narrow this down by doing something similar.

BTW, even though dmesg entries may be interpreted as FS errors the underlying data is on the drive so it begins with reading the data from the drive and an error there.
 
Old 02-03-2021, 05:09 PM   #15
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by computersavvy View Post
Someone just recently posted about using ddrescue on a disk that was showing errors and found 2000+ sectors that ddrescue was unable to access. Definitely bad blocks even though smartctl showed 0 relocated sectors. Maybe you could narrow this down by doing something similar.
I've used ddrescue with no errors

Quote:
Originally Posted by wakatana View Post
Hello
I have external HDD Samsung (inside it is Seagate Baracuda) D3 Station 2TB contaning one NTFS patition. I've successfully cloned whole disk using ddrescue with no errors. From cloned image I can mount NTFS partition and seems that everything is fine except one file:
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can disk reporting badblocks>0 suddenly become badblocks==0? kaza Linux - Hardware 2 04-09-2019 06:45 PM
Many random segfaults, I/O crashes, but no errors in memtest86+ and badblocks. Is it really hardware? ateu006 Linux - Newbie 3 09-13-2017 09:11 AM
[SOLVED] smartctl long selftest shows read error joe_2000 Linux - Hardware 21 12-24-2013 06:41 AM
[SOLVED] Are the programs in util-linux the same version as those in util-linux-ng? harryhaller Slackware - Installation 2 10-07-2011 09:43 AM
LXer: Linux Certification: Vendor-Specific or Vendor Neutral LXer Syndicated Linux News 0 01-19-2007 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration