OSMC Corrupts files

I have been playing videos (of various file types) from a USB flash drive. Over time, and after a few days of use, random files will be corrupted and rendered unplayable. Either the video will be randomly cut so it has a shorter length (in time) or it will be completely corrupted and be listed as a 32KB file.

Also, whenever I plug this drive into my windows machine, it prompts me to scan the drive and repair any issues it finds. The USB drive is formatted for ex-FAT and has 128GB of capacity.

My log has been uploaded here.

I don’t understand the whole enable debugging thing, does it just need to be enabled during the log upload, and/or when the error (corruption event) occurs? I have tried to do both.

Thanks,
girak

It’s highly doubtful that simply playing files from the USB flash drive (eg only reading them) could cause any corruption to the disk.

I would suspect either a power issue (low voltage) or a faulty USB stick. Your log is full of errors like this:

Jan 11 15:10:57 osmc kernel: usb 1-1.2: reset high-speed USB device number 5 using dwc_otg
Jan 11 15:11:30 osmc kernel: usb 1-1.2: reset high-speed USB device number 5 using dwc_otg

Which means the USB controller has lost contact with the USB device and tried to reset it to recover communication. There are also a lot of read errors from the disk:

Jan 11 15:24:57 osmc mount.exfat[346]: failed to read cluster 0x2a92e
Jan 11 15:24:57 osmc mount.exfat[346]: failed to read cluster 0x2a92e
Jan 11 15:24:58 osmc mount.exfat[346]: failed to read cluster 0x2a92e
Jan 11 15:24:58 osmc mount.exfat[346]: failed to read cluster 0x2a92e

I can’t see this being a software issue. I’d check your power supply and try a different USB drive.

Thanks for the input.

I am using a 5.3V/2A power supply “made for RPi’s” Perhaps I need to back off on the overclocking to reduce power consumption?

Has anyone had luck with a capacitor soldered to + & - terminals on the GPIO header to prevent dips in voltage?

girak

Backing your overclock off back to “normal” would be the first thing I would check for anything that seems like a hardware problem. Not all Pi 2’s can run at Turbo - mine can’t regardless of what power supply I use, so I’ve just come to accept that my Pi 2 doesn’t overclock as well as some others.

The log files indicate pretty serious issues with the USB drive - whilst reading the drive shouldn’t be able to corrupt it, if it is losing power repeatedly or the USB interface is being repeatedly reset (this can also happen due to low voltage) this would have the potential to cause corruption as it may interrupt house keeping routines that the flash drive runs in the background. (Even if the Pi isn’t writing to the disk the controller in the disk may be refreshing/remapping data in the background and effectively you are yanking the power on it repeatedly)

You can look at your system journal (the one the errors were showing up in) with

sudo journalctl

Try using normal overclock and see if you still experience the reset high-speed USB device or failed to read cluster errors.