So, I've got a USB hard drive, which automounts and is used for hourly-daily-weekly-monthly full-disk snapshots via snapshot.
It seems to have failed. I am leery of attempting to reformat entirely if recovery is possible since that would lose me all the old backups.
Context
OS is Linux Mint 18.1. The drive is a WD MyPassport. The only reason for using a USB drive for this is that I already had it - I don't tend to unplug it.
I recently changed what power strips things were plugged into, which is the only recent event that might have caused power loss - the computer was off when I did that, though. I had some trouble booting after that, searching seemed to indicate a problem solvable by shorting the CLR CMOS pins on my motherboard to reset the BIOS. So apparently there might have been power issues, somehow. After that, I continued to have trouble booting past the emergency-recovery terminal until I removed the backup drive from my fstab
.
Attempts to diagnose
(all commands with sudo
)
fdisk -l /dev/sdb
produces fdisk: cannot open /dev/sdb: Input/output error
blkid /dev/sdb
outputs nothing.
fsck /dev/sdb
outputs
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdb
Could this be a zero-length partition?
ls /dev
lists sdb
Attempting to mount it by UUID produces mount: can't find UUID=83dbb817-b194-4c83-bb3f-9b67163e1c5c
Attempting to boot the computer without commenting the drive out of my fstab
results in the green-dots boot splash lasting a very long time, eventually turning orange and producing various error messages. The only one I transcribed started off with blk_update_request: critical medium error
.
When I shut down before it finished turning off, I got the following terminal screen:
Linux Mint 18.1 Serena dt tty 1
dt login: [ 5840.759433] blk_update_request: critical medium error, dev sdb, sector 0
[ 5840.759523] Buffer I/O error on dev sdb, logical block 0, async page read
Those two error messages repeated (slowly, a significant delay between each) several times with increasing timestamps until the machine eventually powered off. The gap before the second time the message showed was approx. 17 seconds. Didn't get a picture any further on, but it went for maybe half a dozen more repeats. Those were roughly the errors seen on attempted boot, as well.
I've just noticed that the little light on the drive keeps flashing, and the drive keeps whirring softly when the computer is turned off. I am unable to recall whether this was the case when it was working properly.
Tried smartctl
:
~ $ sudo smartctl -i -A /dev/sdb
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.8.0-56-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Elements / My Passport (USB, AF)
Device Model: WDC WD20NMVW-11AV3S4
Serial Number: WD-WX11E23AAA87
LU WWN Device Id: 5 0014ee 2b36180eb
Firmware Version: 01.01A01
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5200 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Wed Jun 21 22:50:33 2017 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
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 0x002f 200 200 051 Pre-fail Always - 207
3 Spin_Up_Time 0x0027 222 216 021 Pre-fail Always - 3900
4 Start_Stop_Count 0x0032 099 099 000 Old_age Always - 1664
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 185 185 000 Old_age Always - 248
9 Power_On_Hours 0x0032 094 094 000 Old_age Always - 4855
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 182
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 56
193 Load_Cycle_Count 0x0032 199 199 000 Old_age Always - 5196
194 Temperature_Celsius 0x0022 126 105 000 Old_age Always - 26
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 3
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
dmesg
pastebin: here
dmesg
for relevant error messages. Try to get SMART data withsmartctl -i -A /dev/sda
as root.dmesg
has a very large amount of stuff and I can't discern the errors from the nonerrors. The two lines that showed on rebooting also show repeatedly there, though.fsck
, it is partition you shall checkfsck /dev/sdb1
and so ondmesg > some_file
and put it in a pastebin or similar, edit your question with the link. Don't attempt to do anything withfsck
yet, the reads are failing for some reason, and usingfsck
will make it worse.