You are not logged in.

#1 2016-10-28 18:30:18

Foryah
Member
Registered: 2016-06-02
Posts: 27

[SOLVED] Corrupted USB drive

I did a pretty stupid thing... I tried to format a USB drive as ntfs, so I opened GParted, select the format, hit apply, and waited for 5 minutes... nothing happened... So, I tried to cancel... It didn't work. The operation was still in progress... So, I tried to cancel again, and again, and again... But nothing happened. After 10 minutes I ran out of patience and I sudo kill gparted ( I'm a huge idiot... I know... )

After that... this is what I get :

Fdisk :

➜  ~ s fdisk /dev/sdc

Welcome to fdisk (util-linux 2.28.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

fdisk: cannot open /dev/sdc: Input/output error

Dmesg:

blk_update_request: I/O error, dev sdc, sector 61702016
Buffer I/O error on dev sdc, logical block 7712752, async page read

dd:

➜  ~ sudo dd if=/dev/sdc of=/tmp/r1 bs=512
dd: error reading '/dev/sdc': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 0.00154334 s, 0.0 kB/s

od:

➜  ~ sudo od -N 128 /dev/sdc
od: /dev/sdc: read error: Input/output error
0000000

I can throw it to the trash, right ? smile

Last edited by Foryah (2016-10-30 07:15:04)

Offline

#2 2016-10-28 18:33:45

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Corrupted USB drive

The errors you post let me think of a hardware failure. Probably the usb key but it might be the USB port too. Try to put it on another port. Try to use the key with another computer. The "stupidity" you have done with gparted could (would) have trashed the data on the key but would not have damaged the key physically. Probably the hang of gparted was due to the same hardware problems.

Last edited by olive (2016-10-28 18:34:32)

Offline

#3 2016-10-28 18:41:33

frostschutz
Member
Registered: 2013-11-15
Posts: 1,658

Re: [SOLVED] Corrupted USB drive

is this before or after you plugged it back in? it might have changed its name to /dev/sdd or something, check dmesg / proc/partitions etc.

Offline

#4 2016-10-28 18:42:34

Foryah
Member
Registered: 2016-06-02
Posts: 27

Re: [SOLVED] Corrupted USB drive

Nope, I tried it on a Windows machine, and it finds the usb key, but is saying that the drive needs to be formatted... Then it fails to format it. So, it might be the usb key... but I used it today to move data from a Linux machine to  a Mac machine and it worked fine... It's a pretty new usb key... Couple of months old...

It's /dev/sdc ...  I checked smile

Last edited by Foryah (2016-10-28 18:43:50)

Offline

#5 2016-10-28 18:51:57

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Corrupted USB drive

Usually it works fine before it breaks... It's more probably an hardware problem especially if you say that it doesn't work on Windows either, and most probably that was the reason gparted hanged. Whatever you have done with the drive the dd command you mention shouldn't fail.

Last edited by olive (2016-10-28 18:52:36)

Offline

#6 2016-10-28 18:53:24

Foryah
Member
Registered: 2016-06-02
Posts: 27

Re: [SOLVED] Corrupted USB drive

I also got this :

➜  ~ sudo smartctl -a -d scsi /dev/sdc
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.8.4-1-ARCH] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               JetFlash
Product:              Transcend 32GB
Revision:             1100
Compliance:           SPC-4
User Capacity:        31,591,497,728 bytes [31.5 GB]
Logical block size:   512 bytes
LU is fully provisioned
scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
Logical Unit id:      0x00010200000608040x2020030102060804error: SCSI name string
Serial number:        AA00000000000489
Device type:          disk
scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
Local Time is:        Fri Oct 28 20:52:07 2016 CEST
SMART support is:     Available - device has SMART capability.
SMART support is:     Disabled
Temperature Warning:  Disabled or Not Supported

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
Device does not support Self Test logging

Offline

#7 2016-10-28 19:09:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,182

Re: [SOLVED] Corrupted USB drive

Check dmesg after attaching the device and then try to dd /dev/zero *onto* it (ie of=/dev/sdx, not the nopartition /dev/sdx1), but the device is likely done, yes (and that's probably why gparted took a nap)

Offline

#8 2016-10-28 19:15:17

Foryah
Member
Registered: 2016-06-02
Posts: 27

Re: [SOLVED] Corrupted USB drive

Both the dd and dmesg are already posted in the first post smile But I found a 'recovery tool' from JetFlash, the manufacturer of this flash drive... I have to find a Windows machine and try it.

Offline

#9 2016-10-28 19:34:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,182

Re: [SOLVED] Corrupted USB drive

dd *of*=/dev/sdx if=/dev/zero, good luck with the recovery tool

Offline

#10 2016-10-29 08:14:41

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Corrupted USB drive

Foryah wrote:

Both the dd and dmesg are already posted in the first post smile But I found a 'recovery tool' from JetFlash, the manufacturer of this flash drive... I have to find a Windows machine and try it.

What are you really trying? To recover the data on the disk or to "repair" the hardware? You might have some luck to retrieve data that were on the disk provided the disk is only partially damaged but you won't be able to repair the hardware. If it is only a couple of months old as you said, it should still be under warranty.

As I said, the "stupid things" you might have done would have trashed the data on the drive but you haven't physically damaged the drive with "kill -9 gparted".

Last edited by olive (2016-10-29 08:22:00)

Offline

#11 2016-10-29 09:01:59

The Loko
Member
From: Spain
Registered: 2014-07-23
Posts: 103

Re: [SOLVED] Corrupted USB drive

You can try to create a new partition table on the drive with Gparted.

Offline

#12 2016-10-29 18:20:08

Foryah
Member
Registered: 2016-06-02
Posts: 27

Re: [SOLVED] Corrupted USB drive

@olive:  I was hoping is not an hardware issue, but I'm starting to think it is one smile
@The Loko:  Gparted gets a I/O error when tries to read the device...

Since it's a hardware issue and there's nothing I can do, I'm just gonna close the topic

Offline

#13 2016-10-30 02:15:42

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Corrupted USB drive

Sounds like the issue is "solved", actually. wink
Since you now know what the problem is and that there is nothing to do about it.

...

"Closed" is a word used by the forum software to indicate a thread that has been locked by the moderators. Please don't use that, since it promulgates confusion.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#14 2016-10-30 07:14:43

Foryah
Member
Registered: 2016-06-02
Posts: 27

Re: [SOLVED] Corrupted USB drive

Ok, got it smile

Offline

#15 2016-10-30 18:37:16

Foryah
Member
Registered: 2016-06-02
Posts: 27

Re: [SOLVED] Corrupted USB drive

By the way... Their recovery tool resurrected the usb drive after 5 minutes smile So, it's just bad hardware I guess...

Offline

Board footer

Powered by FluxBB