LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-26-2023, 09:45 AM   #1
Peter Lupin
LQ Newbie
 
Registered: Apr 2023
Posts: 3

Rep: Reputation: 0
How to recover a possibly dead USB HD?


First off this is not a 'Linux' problem, it also occurs on windows and OSX. I'm hoping that this forum can help.

I have an external usb HD (Western Digital My Book 1130 1TB) with two partitions: #1 formatted by OSX and #2 formatted as exfat.

Exfat partition used to transfer things across OSX - Linux

As of yesterday OSX doesn't see it when I plug it in.

On Linux the following happens after I plug it in:

- takes about 5 minutes to be detected
- /var/log/dmesg says:
Code:
Apr 26 10:20:10 aurora kernel: sd 4:0:0:0: [sdc] Mode Sense: 00 00 00 00
Apr 26 10:23:06 aurora kernel: sd 4:0:0:0: [sdc] Mode Sense: 47 00 10 08
Apr 26 10:27:25 aurora last message buffered 1 times
Apr 26 10:32:53 aurora last message buffered 1 times
Apr 26 10:34:13 aurora kernel: sd 4:0:0:0: [sdc] Mode Sense: 23 00 00 00
Apr 26 10:38:07 aurora kernel: sd 4:0:0:0: [sdc] Mode Sense: 47 00 10 08
Apr 26 10:40:13 aurora kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
Apr 26 10:40:13 aurora kernel: e820: remove [mem 0x000a0000-0x000fffff] usable
Apr 26 10:40:13 aurora kernel: e820: update [mem 0x789e2000-0x789e2fff] usable ==> reserved
Apr 26 10:40:13 aurora kernel: e820: update [mem 0x76ea8000-0x76ed6fff] usable ==> reserved
Apr 26 10:40:13 aurora kernel: pcpu-alloc: s208896 r8192 d28672 u262144 alloc=1*2097152
Apr 26 10:40:13 aurora kernel: pcpu-alloc: [0] 0 1 2 3 4 5 6 7
Apr 26 10:40:13 aurora kernel: libata version 3.00 loaded.
Apr 26 10:40:13 aurora kernel: PCI: pci_cache_line_size set to 64 bytes
Apr 26 10:40:13 aurora kernel: e820: reserve RAM buffer [mem 0x00058000-0x0005ffff]
Apr 26 10:40:13 aurora kernel: e820: reserve RAM buffer [mem 0x0009e000-0x0009ffff]
Apr 26 10:40:13 aurora kernel: e820: reserve RAM buffer [mem 0x6dd35000-0x6fffffff]
Apr 26 10:40:13 aurora kernel: e820: reserve RAM buffer [mem 0x76ea8000-0x77ffffff]
Apr 26 10:40:13 aurora kernel: e820: reserve RAM buffer [mem 0x789e2000-0x7bffffff]
Apr 26 10:40:13 aurora kernel: e820: reserve RAM buffer [mem 0x79d37000-0x7bffffff]
Apr 26 10:40:13 aurora kernel: e820: reserve RAM buffer [mem 0x7b3ff000-0x7bffffff]
Apr 26 10:40:13 aurora kernel: e820: reserve RAM buffer [mem 0x47f000000-0x47fffffff]
Apr 26 10:40:13 aurora kernel: ahci 0000:00:17.0: version 3.0
- /var/log/messages says:
Code:
Apr 26 10:43:10 aurora kernel: usb 1-6: new high-speed USB device number 7 using xhci_hcd
Apr 26 10:43:10 aurora kernel: usb 1-6: New USB device found, idVendor=1058, idProduct=1130, bcdDevice=10.12
Apr 26 10:43:10 aurora kernel: usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 26 10:43:10 aurora kernel: usb 1-6: Product: My Book 1130
Apr 26 10:43:10 aurora kernel: usb 1-6: Manufacturer: Western Digital
Apr 26 10:43:10 aurora kernel: usb 1-6: SerialNumber: 57434156354E373535333037
Apr 26 10:43:10 aurora kernel: usb-storage 1-6:1.0: USB Mass Storage device detected
Apr 26 10:43:10 aurora kernel: scsi host4: usb-storage 1-6:1.0
Apr 26 10:43:10 aurora mtp-probe: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6"
Apr 26 10:43:10 aurora mtp-probe: bus: 1, device: 7 was not an MTP device
Apr 26 10:43:12 aurora kernel: scsi 4:0:0:0: Direct-Access     WD       My Book 1130     1012 PQ: 0 ANSI: 6
Apr 26 10:43:12 aurora kernel: scsi 4:0:0:1: Enclosure         WD       SES Device       1012 PQ: 0 ANSI: 6
Apr 26 10:43:32 aurora kernel: sd 4:0:0:0: [sdc] Spinning up disk...
Apr 26 10:43:37 aurora root: ACPI action down is not defined
Apr 26 10:43:39 aurora root: ACPI action up is not defined
Apr 26 10:43:40 aurora last message buffered 3 times
Apr 26 10:44:03 aurora kernel: usb 1-6: reset high-speed USB device number 7 using xhci_hcd
Apr 26 10:44:03 aurora kernel: ses 4:0:0:1: Attached Enclosure device
Apr 26 10:44:42 aurora root: ACPI action up is not defined
Apr 26 10:44:42 aurora root: ACPI action down is not defined
Apr 26 10:44:53 aurora last message buffered 1 times
Apr 26 10:45:15 aurora root: ACPI action right is not defined
Apr 26 10:45:17 aurora root: ACPI action up is not defined
Apr 26 10:45:18 aurora last message buffered 3 times
Apr 26 10:45:55 aurora kernel: sd 4:0:0:0: [sdc] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
Apr 26 10:45:55 aurora kernel: sd 4:0:0:0: [sdc] Write Protect is off
Apr 26 10:46:06 aurora root: ACPI action up is not defined
Apr 26 10:46:16 aurora kernel: sd 4:0:0:0: [sdc] Spinning up disk...
Apr 26 10:46:46 aurora kernel: usb 1-6: reset high-speed USB device number 7 using xhci_hcd
...
Apr 26 11:00:46 aurora kernel: sd 4:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=DRIVER_OK cmd_age=182s
Apr 26 11:00:46 aurora kernel: sd 4:0:0:0: [sdc] tag#0 Sense Key : 0x2 [current]
Apr 26 11:00:46 aurora kernel: sd 4:0:0:0: [sdc] tag#0 ASC=0x4 ASCQ=0x1
Apr 26 11:00:46 aurora kernel: sd 4:0:0:0: [sdc] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
Apr 26 11:01:15 aurora root: ACPI action right is not defined
Apr 26 11:01:17 aurora root: ACPI action up is not defined
Apr 26 11:01:19 aurora last message buffered 4 times
Apr 26 11:01:21 aurora root: ACPI action down is not defined
Apr 26 11:01:35 aurora root: ACPI action up is not defined
Apr 26 11:01:36 aurora root: ACPI action right is not defined
Apr 26 11:01:38 aurora root: ACPI action up is not defined
Apr 26 11:01:40 aurora last message buffered 6 times
...
- lsblk sees /dev/sdc, not /dev/sdc1 or /dev/sdc2 partitions

- blkid hangs waiting for sdc to respond; can't be killed with -9

- cfdisk /dev/sdc hangs waiting for sdc to respond; can't be killed with -9

- unplugging usb cable releases blkid and cfdisk.
Code:
- ls /dev/sdc shows
   brw------- 1 root root 8, 32 Apr 26 11:10 /dev/sdc
   whereas any other usb plugged in is shown as 
   brw-rw---- 1 root root 8, 32 Apr 26 11:10 /dev/sdc

- chmod 660 /dev/sdc changes perms but makes no difference
What can be done to access the exfat partition even for 5 minutes :-) so I copy things off?
exfat partition was not backed up in a long time - yes my bad!!

TIA
 
Old 04-26-2023, 11:25 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,766

Rep: Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933
Welcome to LinuxQuestions.

Can you feel the disk spinning?

The OS can not read the disk which could mean a head crash, motor died, power supply died or maybe some of the electronics failed. Have you verified the AC adapter is fully plugged in? You can try reading the SMART data via smartctl (you might have to install it) to look for errors but otherwise not much else you can do yourself.
 
Old 04-26-2023, 11:55 AM   #3
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,509

Rep: Reputation: Disabled
Quote:
mtp-probe: bus: 1, device: 7 was not an MTP device
This might be a related issue - https://superuser.com/questions/1206...-usb-mass-stor
 
Old 04-26-2023, 03:30 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,010

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Yank the drive out and put in computer?
 
Old 04-26-2023, 03:30 PM   #5
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by fatmac
mtp-probe: bus: 1, device: 7 was not an MTP device
That is correct. Only devices that support MTP (most commonly phones and media players) should be detected as MTP devices.

Try disabling UAS under linux. UAS (USB Attached Storage) has caused me headaches at random in the past, especially with some external SSDs (controller issues?). Typically it sees the device, and will either not assign it a device node or does not recognize partitions. However it *does* detect the device itself and logs it.

Try this assuming the device is not dead.

* Unplug the device.
* run modprobe -r uas or rmmod uas as root.
* Plug in the device and see if the situation improves.

If that doesn't work, blacklist UAS at boot, and try again.

At the grub menu, press 'e' to edit the command line, and add modprobe.blacklist=uas

Continue to boot, plug in the device, and see if that improves things.
 
Old 04-27-2023, 06:45 AM   #6
Peter Lupin
LQ Newbie
 
Registered: Apr 2023
Posts: 3

Original Poster
Rep: Reputation: 0
@goumba: don't have uas loaded

@fatmac: it is seen as USB not mtp, in fact I don't have mtp :-)

@michaelk: smartctl hangs like fdisk or blkid

@jefro: yes I was thinking of that but not sure how to do it. Will look into it

Thanks every one...any other ideas? Really need to get that data off the drive.
 
Old 04-27-2023, 07:14 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,766

Rep: Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933
I am with jefro with removing the drive and testing it in a computer or using a USB SATA adapter.

If that proves the drive has failed in some manner then a data recovery service might be your only choice in trying to recover your files.
 
Old 04-27-2023, 09:21 AM   #8
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,988

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Quote:
First off this is not a 'Linux' problem, it also occurs on windows and OSX.
It's clearly a hardware problem and it's highly unlikely that there will be any magic commands in linux that will remedy that problem. As others have noted, the hardware issues can be in three probable areas:

1. The power supply - if this is the case you will hear a lot of clicking noises coming from the device as the hard drive actuator continually resets itself;

2. The sata to usb adapter in the device - pulling the drive and either directly connecting it via sata or using a known good sata to usb3 adapter is the only way to test this;

3. The hard drive itself is failing or has failed - pulling the drive, connecting via sata to usb or, preferably directly via sata and then running diagnostics on the drive with either smartmon tools or WD's own diagnostic utilities is the only way to isolate if this is the problem.

You can download the WD diagnostic utilities here:

https://support-en.wd.com/app/answer...lBVRHQySDVxIn0.
 
Old 04-27-2023, 12:29 PM   #9
Arnulf
Member
 
Registered: Jan 2022
Location: Hanover, Germany
Distribution: Slackware
Posts: 270

Rep: Reputation: 89
Quote:
Originally Posted by Peter Lupin View Post
smartctl hangs
That behavior of smartctl is expected because smartctl doesn't commonly work over USB.
 
Old 04-27-2023, 12:36 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,766

Rep: Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933
True but some USB bridges are supported and I think that WD is on the list. If it was not supported and the drive was working properly you would typically see a message saying it was not at least from my experience.
 
Old 04-27-2023, 02:35 PM   #11
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by Arnulf View Post
That behavior of smartctl is expected because smartctl doesn't commonly work over USB.
It *should* give an error, not hang.

Code:
ariel% sudo smartctl -a /dev/sdc
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.2.10-1-default] (SUSE RPM)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: scsi error unsupported field in scsi command


If this is a USB connected device, look at the various --device=TYPE variants
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
Code:
ariel% sudo smartctl --scan     
/dev/sda -d scsi # /dev/sda, SCSI device       <-- SATA attached
/dev/sdb -d scsi # /dev/sdb, SCSI device       <-- SATA attached
/dev/sdc -d sat # /dev/sdc [SAT], ATA device   <-- usb attached

Last edited by goumba; 04-27-2023 at 02:38 PM.
 
Old 04-27-2023, 03:57 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,010

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
I had to yank a 2G drive out of a Seagate just the other day. It was a destructive method. The top had clips but when I removed the top the clips broke. The drive was in a metal holder that had the usb to drive adapter. I didn't know that adapter was bad till I put a voltmeter on the connection to board. Thought originally the power supply was bad. Now I have an extra power supply.
 
Old 04-28-2023, 06:36 AM   #13
Peter Lupin
LQ Newbie
 
Registered: Apr 2023
Posts: 3

Original Poster
Rep: Reputation: 0
I'm marking this as solved even though haven't really found a solution. I think the HD is kaput. Will keep it around in case I come across other things to try or have some brainwave...will let you know. Thanks everyone for the suggestions.
 
  


Reply



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
how to recover data from dead external usb harddrive mohdsuboor23 Linux - Hardware 3 11-22-2010 04:48 AM
Could use help trying to recover files from possibly hosed partition ClodHopper Linux - General 4 06-27-2010 12:21 PM
Possibly dead laptop, dont know where to start. xconspirisist Linux - Laptop and Netbook 5 11-16-2005 10:29 PM
Unable to mount CD. Possibly my CD-ROM just dead? z-vet Linux - Hardware 3 03-19-2005 06:26 AM
Squid:2nd Browser access Internet SPEED dead becomes dead slow mwj Linux - Software 1 10-04-2003 01:40 PM

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

All times are GMT -5. The time now is 11:03 PM.

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