View previous topic :: View next topic |
Author |
Message |
alienjon Veteran
Joined: 09 Feb 2005 Posts: 1719
|
Posted: Wed Oct 30, 2024 11:19 pm Post subject: Corrupt File? |
|
|
I have an xlsx file on my server that I use to help with budgeting. I've served it on my server for literal years and accessed it remotely. Today when I went to open it the file can't be found. When I looked for the file this comes up:
ls {directory}: | ls: cannot access 'Finances.xlsx': Input/output error
[...]
-????????? ? ? ? ? ? Finances.xlsx
[...] |
A few other files in that directory show the same. This is definitely new - from within the last week. I haven't see this before and when I try to copy the file somewhere else I get this error:
cp Finances.xlsx ~/home/{username}: | cp: cannot stat 'Finances.xlsx': Input/output error |
Any way to recover this? I do have a backup somewhere, but I'm ashamed to say it's older than it should be. |
|
Back to top |
|
|
alienjon Veteran
Joined: 09 Feb 2005 Posts: 1719
|
Posted: Wed Oct 30, 2024 11:54 pm Post subject: |
|
|
Whelp, I assumed it was a problem with the drive and here's what I see:
smartctl -t short /dev/sdb: | |
Waited 5 minutes.
smartctl -a /dev/sdb: | smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.52-gentoo] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Toshiba P300 (CMR)
Device Model: TOSHIBA HDWD130
Serial Number: Y710MJ8AS
LU WWN Device Id: 5 000039 fe6dc784d
Firmware Version: MX6OACF0
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5610
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: Wed Oct 30 19:50:20 2024 EDT
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: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
See vendor-specific Attribute list for failed 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: (21648) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No 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: ( 361) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 130 130 054 Pre-fail Offline - 103
3 Spin_Up_Time 0x0007 162 162 024 Pre-fail Always - 351 (Average 355)
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 1452
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 097 097 067 Pre-fail Always - 3
8 Seek_Time_Performance 0x0005 124 124 020 Pre-fail Offline - 33
9 Power_On_Hours 0x0012 092 092 000 Old_age Always - 56798
10 Spin_Retry_Count 0x0013 001 001 060 Pre-fail Always FAILING_NOW 1638425
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 123
192 Power-Off_Retract_Count 0x0032 098 098 000 Old_age Always - 2502
193 Load_Cycle_Count 0x0012 098 098 000 Old_age Always - 2502
194 Temperature_Celsius 0x0002 142 142 000 Old_age Always - 42 (Min/Max 13/55)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 56798 -
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.
The above only provides legacy SMART information - try 'smartctl -x' for more |
Also, in DMESG:
This comes up in the midst of SATA loading in the kernel (i rebooted before doing the SMART test):
Code: | [ 0.930754] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.SAT0.PRT0._GTF.DSSP], AE_NOT_FOUND (20230628/psargs-330)
[ 0.932605] ACPI Error: Aborting method \_SB.PCI0.SAT0.PRT0._GTF due to previous error (AE_NOT_FOUND) (20230628/psparse-529)
[ 0.933769] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.SAT0.PRT3._GTF.DSSP], AE_NOT_FOUND (20230628/psargs-330)
[ 0.935773] ACPI Error: Aborting method \_SB.PCI0.SAT0.PRT3._GTF due to previous error (AE_NOT_FOUND) (20230628/psparse-529) |
Later:
Code: | [ 1.098970] input: USB USB Keyboard Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1/0003:1A2C:0C21.0002/input/input4
[ 1.100737] ata4.00: exception Emask 0x0 SAct 0x8000 SErr 0x0 action 0x0
[ 1.101807] sdd: sdd1
[ 1.101869] input: USB USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1/0003:1A2C:0C21.0002/input/input5
[ 1.102918] ata4.00: irq_stat 0x40000008
[ 1.102925] ata4.00: failed command: READ FPDMA QUEUED
[ 1.102929] ata4.00: cmd 60/08:78:00:00:00/00:00:00:00:00/40 tag 15 ncq dma 4096 in
res 61/04:00:00:00:00/00:00:00:00:00/00 Emask 0x401 (device error) <F>
[ 1.104398] sd 4:0:0:0: [sdd] Attached SCSI disk
[ 1.104440] sdb: sdb1
[ 1.104641] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 1.106780] ata4.00: status: { DRDY DF ERR }
[ 1.116687] ata4.00: error: { ABRT }
[ 1.118799] sda: sda1 sda2 sda3 sda4
[ 1.120437] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1.120528] ata4.00: configured for UDMA/133 (device error ignored)
[ 1.122945] ata4: EH complete
[ 1.134874] sde: sde1
[ 1.136331] sd 5:0:0:0: [sde] Attached SCSI disk
[ 1.150852] ata4.00: NCQ disabled due to excessive errors
[ 1.152008] ata4.00: exception Emask 0x0 SAct 0x400000 SErr 0x0 action 0x0
[ 1.153158] ata4.00: irq_stat 0x40000008
[ 1.154316] ata4.00: failed command: READ FPDMA QUEUED
[ 1.155448] ata4.00: cmd 60/08:b0:00:00:00/00:00:00:00:00/40 tag 22 ncq dma 4096 in
res 61/04:00:00:00:00/00:00:00:00:00/00 Emask 0x401 (device error) <F>
[ 1.157759] ata4.00: status: { DRDY DF ERR }
[ 1.158894] ata4.00: error: { ABRT } |
Looks like the drive is dying. To be fair, it is a few years old and gets regular use. I'll backup and take it from there. In good news, after the reboot that Finances file is back! So I guess I got that goin for me... |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2167
|
Posted: Thu Oct 31, 2024 12:22 pm Post subject: |
|
|
You probably know about ddrescue. _________________ Greybeard |
|
Back to top |
|
|
alienjon Veteran
Joined: 09 Feb 2005 Posts: 1719
|
Posted: Fri Nov 01, 2024 1:04 am Post subject: |
|
|
I do! I do not think I have a drive big enough for a backup of this particular drive though, unfortunately. I'll double check as I haven't actually used the program before and if it compresses well enough then it might work. I do have a new drive coming in the day after tomorrow and it's still working now, so hoping it continues. Thanks for the reminder. I'll check into ddrescue. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2373
|
Posted: Fri Nov 01, 2024 5:41 am Post subject: |
|
|
alienjon wrote: | I do! I do not think I have a drive big enough for a backup of this particular drive though, unfortunately. |
Just backup your user data. You can always perform a new installation. Now faster than ever with the aid of the binhost. Also remember to skip /var/cache/distfiles and /var/tmp.
Best Regards,
Georgi |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Fri Nov 01, 2024 9:34 am Post subject: |
|
|
The drive is a not dead yet. Indeed, the pending sector count is zero, so the drive has not got any unreadable sectors that it knows about.
The reallocated sector count is also zero, so there have been no sectors relocated because they are getting difficult to read.
The Spin Retry Count is related to spinups somehow.
If the drive fails to spin up, is will never become ready and will not appear in /dev.
All your data is lost then.
While it's working, back up your user data ... while you still can.
Don't run any tests, that's wasting drive life that you may not have.
Once you have all the data you need, run the long test, it's the only useful test.
That does a full surface scan of the drive but stops at the first read error.
Tools like ddrescue are not required yet. It's main use is getting as much data as possible from a drive with failed and failing sectors. That's not you yet.
Your file may be corrupt. I've seen NFS do this a few times. The file shows like your example on remote mounts but is OK over ssh.
Check the warranty status. A SMART failure like you have is a no questions asked warranty replacement, if the drive is still in warranty. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2373
|
Posted: Fri Nov 01, 2024 9:38 am Post subject: |
|
|
One thing I can add is that there might be a bad connection somewhere. Have you tried another drive at the same slot?
Also I have had corrupted data due to failed sleep/resume.
Even if it turns out to be a bad connection, spinning disks are already rare these days, it must be old. You must by all means keep backups of your important data if you intend to continue using it.
Best Regards,
Georgi |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Fri Nov 01, 2024 9:47 am Post subject: |
|
|
The (apparent) corruption can be a bad data connection.
The SMART failure is internal to the drive.
The warning to get what you can, while you can, still applies. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|