Linux corrupted my USB external HDD (NTFS)

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

Linux corrupted my USB external HDD (NTFS)

Postby external_undies on Mon Jan 14, 2013 5:15 pm

hi guys

i wanted to post here and ask -- has anybody else had this problem, and successfully recovered all the data? i did some googling and found people with moderately similar issues but all of the stories had a bad ending and drives had to be formatted.

let me mention that the USB hard disk had two NTFS partitions. one partition was a boot which used to be inside a laptop that booted windows 7 x64.

anyway, i plugged it into my linux box to move a few folders from one volume to the other and got an error message on a few files, but i figured it must just be a problem with linux reading the file table, and the files were going to be deleted afterwards anyway so i didn't care.

when linux finished moving the files i plugged the HDD into my windows box and... windows told me i had to format both volumes. it could not read either of them. i managed to run chkdsk on one of them, it fixed a lot of file allocation errors, and then the drive showed up in windows explorer, except that quite a lot of files were missing. chkdsk could not even read the second volume, and this was a big problem.

fast forward to now and i'm half way through testdisk analyzing my drive cylinder by cylinder.

can linux do anything with NTFS file systems aside from reading them? i think i should have avoided doing what i did, however i was not aware of the consequences. the power of retrospect, eh?

for the record i'm running Mint 14 Cinnamon 32 bit and am quite a linux noob, only installed it about a week ago.

sorry about the long post, but thanks for everything.

i wish my first post was about better things but let's get on the road to some minty goodness. :)
external_undies
Level 1
Level 1
 
Posts: 3
Joined: Mon Jan 14, 2013 4:40 pm

Linux Mint is funded by ads and donations.
 

Re: Linux corrupted my USB external HDD (NTFS)

Postby thegreatgazoo on Mon Jan 14, 2013 11:41 pm

I don't think Linux did anything to the drives. all It's doing is reading and writing files, unless you messed with the partitions (which I'm sure you didn't). So that leads me to believe that the drive may be starting to go bad.
I like to use this tool:
http://www.ghacks.net/2009/08/28/test-usb-flash-drive-and-hard-drive-integrity-and-size/
It's made for windows, but works well in wine too.
Also, it's in german, but there is a button to switch to english.

Anyways, this program writes files and hashes the files to verify that they are not corrupt. It's a good way to check the integrity of usb drives.
thegreatgazoo
Level 3
Level 3
 
Posts: 109
Joined: Wed Aug 22, 2012 3:18 pm

Re: Linux corrupted my USB external HDD (NTFS)

Postby external_undies on Mon Jan 21, 2013 8:25 pm

thanks for that, i'll give it a try. i am a little scared though because of this: "This does however mean that existing files can be harmed if defects are found on the device."

i don't want to lose any more files. have you had any bad experiences?
external_undies
Level 1
Level 1
 
Posts: 3
Joined: Mon Jan 14, 2013 4:40 pm

Re: Linux corrupted my USB external HDD (NTFS)

Postby homerscousin on Mon Jan 21, 2013 10:05 pm

I hate that all of a sudden stuff with anything related to a computer, because it is usually something I did no matter how small and insignificant. I just don't think it is a drive suddenly going bad. Maybe you could post the exact error messages you got. Looks like moving files from one volume to another is the start point.
i5 3570k, ASRock z77 Extreme 4, 8 Gb Ripjaws 1600, Antec 430w psu, HVR 1600 tv tuner, custom case- marble top, oak face. Carver & DCM Time Window sound system. Mint 14 KDE.
homerscousin
Level 5
Level 5
 
Posts: 541
Joined: Fri May 25, 2012 2:43 pm
Location: Somewhere on planet Earth (mostly)

Re: Linux corrupted my USB external HDD (NTFS)

Postby thegreatgazoo on Mon Jan 21, 2013 10:24 pm

Agreed, posting the exact error message might help better understand the issue.

As far a the test tool though, It's pretty safe and does not mess with existing files. What it does is create large files of random data into the empty space. It knows what the checksum of each file should be ahead of time. After it writes each file, it reads it and performs a checksum of the written file. If it finds any discrepancy at all, it tells you. when it's done, you just delete the files it created. It's best to test a blank drive if possible, so that it tests all of the available space.

You can actually do this yourself in Linux. Find a really big file, like a movie file. Do a MD5 chekcsum on the file. Copy the file over and over on to the drive you want to test. Then when you have completely filled up your drive with that file, do a MD5 checksum on each of the files. If any of the files turns out a different number than the original, then your disk may be developing bad sectors.

Good luck
thegreatgazoo
Level 3
Level 3
 
Posts: 109
Joined: Wed Aug 22, 2012 3:18 pm

Re: Linux corrupted my USB external HDD (NTFS)

Postby external_undies on Sat Feb 02, 2013 6:35 am

sorry about the belated reply. i haven't had much time to look into it, but i will see if i can reproduce the errors again as soon as i can get a bit of time to do backups and what not. i'll post my resulst here. thanks again!
external_undies
Level 1
Level 1
 
Posts: 3
Joined: Mon Jan 14, 2013 4:40 pm


Return to Hardware Support

Who is online

Users browsing this forum: Bing [Bot] and 21 guests