LM19 corrupting files on USB flash drives and SD cards

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
MtnMan75
Level 1
Level 1
Posts: 21
Joined: Thu Aug 23, 2018 11:40 pm

LM19 corrupting files on USB flash drives and SD cards

Post by MtnMan75 » Sun Sep 02, 2018 8:11 pm

I'm getting random corrupting of (specifically .txt files so far) files and folders on my thumb drives and SD cards. When I try to open up the files in a text editor is states the file has been corrupted and it shows a string of various characters and a lot of 0's with a red background in it. I just about lost some very important information I had backed up on both those types of media and before I loaded my last item with this info on it I went to a windows computer and created another backup separately for it. Any ideas what might be causing this. I select 'eject' for the drives each time before I pull them out and it has still done this.

Also need to add... It is also randomly making these drives Read-Only sometimes when it becomes corrupted.

OK... here's the really weird part. It has actually merged parts of other files in different folders into each other. I've lost half of an important listing in one text file and the other half of it is a chunk of a different text file under a different folder. What the heck?

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: LM19 corrupting files on USB flash drives and SD cards

Post by catweazel » Mon Sep 03, 2018 1:51 am

MtnMan75 wrote:
Sun Sep 02, 2018 8:11 pm
Re: LM19 corrupting files on USB flash drives and SD cards

I'm getting random corrupting of (specifically .txt files so far) files and folders on my thumb drives and SD cards.
Before blaming LM, it's recommended that you check the flash devices. They have a limited life of write cycles, and cheap FleaBay type devices are often broken and messed with to give them a higher capacity than what they actually have. Any of these could be the cause of the corruption.

sudo fsck /dev/sdb1

Issue that command in a terminal where sdb1 is the linux device identifier for the flash drive.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

MtnMan75
Level 1
Level 1
Posts: 21
Joined: Thu Aug 23, 2018 11:40 pm

Re: LM19 corrupting files on USB flash drives and SD cards

Post by MtnMan75 » Mon Sep 03, 2018 10:54 am

This is two thumb drives and an SD card all pretty much at the same time. The odds are pretty remote all three went corrupt at the same time. Sandisk brand, bought at Wally World. I had tried the USB 3 and 2 ports and the same thing happened with the thumb drives. I managed to create backups on my windows laptop, formatted the media again on Linux and reload the information. So far, so good. But I had been running this for about two weeks with no issue and then it did this. I can access everything now just fine... so hopefully it stays that way. The part that makes me believe it was Linux is the manner in which it did it. The same files, merged with parts of the same parts of other files in different folders among the different types of media.

Should I be using ext2,3, or 4 on my thumb drives? I was keeping them FAT32 so I could pop them into a windows machine if need be (which proved useful this time)

I guess if it were to happen again... is there a command I should run while it is doing it to see what is happening?

the response from sudo fsck /dev/sdi is:
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
/dev/sdi is in use.
e2fsck: Cannot continue, aborting.
(even though I had no files open or the drive was being viewed at the time)

Tried unmounting and doing it with them and one separate from my situation. Same responses. This is after unmounting:
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
fsck.ext2: No medium found while trying to open /dev/sdi

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

MtnMan75
Level 1
Level 1
Posts: 21
Joined: Thu Aug 23, 2018 11:40 pm

Re: LM19 corrupting files on USB flash drives and SD cards

Post by MtnMan75 » Thu Sep 06, 2018 7:02 pm

After having this continue... I've just stopped using any .txt files and turned them all into files that can be opened in LibreOffice. Seems to be a workaround.

Neil Darlow
Level 1
Level 1
Posts: 42
Joined: Fri Aug 03, 2018 5:17 am

Re: LM19 corrupting files on USB flash drives and SD cards

Post by Neil Darlow » Mon Sep 10, 2018 12:39 pm

Are you giving sufficient time, after unmounting, for writes to complete? I mention this because I have some Kingston USB thumb-drives which have an access indicator and they do continue to flash for a while after unmounting them. I always wait for the light to go out and all is OK with FAT32 or NTFS.
LM19 Cinnamon, Intel Core i5 8400 2.8(4.0)GHz, Corsair Vengeance 3400 16GB, Asus Cerberus GTX1050 Ti OC, Samsung 970 Evo 500GB M.2, Western Digital Blue 4TB, Wircard RealTek 8821ae PCIe Dual Band Wireless+Bluetooth 4.0, Pioneer BDR-209EBK BDRW

Post Reply

Return to “Other topics”