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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-31-2021, 06:48 PM
|
#1
|
Member
Registered: Jul 2009
Location: Slovakia
Posts: 141
Rep:
|
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
|
|
|
01-31-2021, 07:26 PM
|
#2
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
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.
|
|
|
02-01-2021, 02:21 AM
|
#3
|
Member
Registered: Jul 2009
Location: Slovakia
Posts: 141
Original Poster
Rep:
|
Thank you very much for reply
Quote:
Originally Posted by Emerson
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
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
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
|
|
|
02-01-2021, 07:22 AM
|
#4
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
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.
|
|
|
02-01-2021, 09:30 AM
|
#5
|
Member
Registered: Jul 2009
Location: Slovakia
Posts: 141
Original Poster
Rep:
|
Quote:
Originally Posted by Emerson
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
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
|
|
|
02-01-2021, 09:35 AM
|
#6
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
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.
|
|
|
02-02-2021, 06:48 AM
|
#7
|
Member
Registered: Jul 2009
Location: Slovakia
Posts: 141
Original Poster
Rep:
|
Quote:
Originally Posted by Emerson
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.
|
|
|
02-02-2021, 12:09 PM
|
#8
|
Senior Member
Registered: Aug 2016
Posts: 3,345
|
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.
|
|
|
02-02-2021, 12:19 PM
|
#9
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
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.
|
|
|
02-02-2021, 01:08 PM
|
#10
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,821
|
Quote:
Originally Posted by computersavvy
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.
|
|
|
02-02-2021, 03:49 PM
|
#11
|
Member
Registered: Jul 2009
Location: Slovakia
Posts: 141
Original Poster
Rep:
|
Quote:
Originally Posted by computersavvy
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
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
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.
|
|
|
02-02-2021, 06:50 PM
|
#12
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,821
|
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".
|
|
|
02-03-2021, 02:50 AM
|
#13
|
Member
Registered: Jul 2009
Location: Slovakia
Posts: 141
Original Poster
Rep:
|
Quote:
Originally Posted by rknichols
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.
|
|
|
02-03-2021, 11:16 AM
|
#14
|
Senior Member
Registered: Aug 2016
Posts: 3,345
|
Quote:
Originally Posted by wakatana
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.
|
|
|
02-03-2021, 05:09 PM
|
#15
|
Member
Registered: Jul 2009
Location: Slovakia
Posts: 141
Original Poster
Rep:
|
Quote:
Originally Posted by computersavvy
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
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:
|
|
|
|
All times are GMT -5. The time now is 10:57 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|