Linux corrupted my USB external HDD (NTFS)

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
external_undies

Linux corrupted my USB external HDD (NTFS)

Post by external_undies »

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. :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
thegreatgazoo

Re: Linux corrupted my USB external HDD (NTFS)

Post by thegreatgazoo »

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-u ... -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.
external_undies

Re: Linux corrupted my USB external HDD (NTFS)

Post by external_undies »

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?
homerscousin

Re: Linux corrupted my USB external HDD (NTFS)

Post by homerscousin »

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.
thegreatgazoo

Re: Linux corrupted my USB external HDD (NTFS)

Post by thegreatgazoo »

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
external_undies

Re: Linux corrupted my USB external HDD (NTFS)

Post by external_undies »

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!
Locked

Return to “Hardware Support”