OSMC deletes random Files

Hi guys,

I’m using osmc since approximately three or four months on my raspberry pi 2 model b, always installing new updates when available. I connected three External Hard Drives, 1x1.5TB, 1x2TB and 1x4TB, all of them WesternDigital and all of them formatted as exFAT.
I don’t know if it helps solving the problem but: I always turn off the system when not used and I had to pull the plug a few times because it would’t respond.

My Problem:
After watching a few episodes of some series I noticed that some files were missing but still visible in the library. Those missing files weren’t necessarily those I already watched but pretty much random files from the hard drive. Sometimes it was the whole content of a folder containing a season (but not the folder itself) which has been deleted, sometimes a few files in a folder, sometimes the whole series (but again, only the files, not the folders). Quite annoying by itself but there is more: even with some files that still were on the Hard Drive, osmc told me that “This file is no longer available. Would you like to remove it from the library?”. After an update (sorry, can’t remember which one) at least this problem has been solved but occurred again just a few day later. So far it only happened to TV-series or at least I couldn’t find any movies that have been deleted.

I was looking for a solution for hours but couldn’t find one. It seems that most people have the exact opposite problem and can’t delete the files. In case there already is a thread around here, I haven’t found it and am sorry for opening one.

If you need more information, please let me know.

I hope you can help me, thanks.

1 Like

I can assure with certainty that OSMC is not deleting random files from your library. Unless you can provide logs that indicate this, then something else is going on here. There would be hundreds of complaints of this issue if it were occurring widely among the user base.

This simply indicates that the source where this file lives is no longer available. You mention several HDD that you have connected, do they all contain the same files? Are they all connected to the pi simulaneously?

Thanks for responding so fast!

I absolutely believe you. Fact is, they are gone when I connect the HDD to my laptop… so, not just removed from the library but gone.
Providing logs might be difficult. To be honest, I don’t know how to do it and from what I’ve read I have to replicate the problem which won’t be easy since I can’t tell when the files disappear. If you can tell me how to do it I will of course provide them as soon as possible.

No, all of them contain different files. One is for movies only, one for series and the last one for miscellaneous videos.
Yes, all of them are always connected simultaneously.

It’s plainly explained in the sticky post at the top of the Help and Support forum.
https://discourse.osmc.tv/t/how-to-obtain-provide-necessary-info-for-a-useful-support-request-includes-current-versions/5507

How are these HDD’s powered? Lack of sufficient power will cause the drives to randomly unmount and make the files sourced there unavailable and will result in the behavior you are reporting.

yes, that’s where I’ve read to:

“Step 2: Repeat the problem”

which I don’t know how to do since i don’t know when and where the problem occurs… Should I just:
“Step 1: Turn on debugging” and “Step 3: Upload the logs” with the HDDs connected? My problem is not how to get the log file but how to repeat the problem… sorry for not making that clear enough earlier.

They get their power from the grid. All of them.

I don’t think that they have ever been unmounted randomly while the system was running. As far as I know OSMC informs me with a pop-up message on the screen when this happens but it never did. Also I have always been able to watch other videos from the same HDD. Only those mentioned random files where deleted (even when I connected the HDD to my laptop) or not accessible anymore.

Yes.

[quote=“skorm, post:5, topic:8061”]
They get their power from the grid. All of them.
[/quote] If this is supposed to be a joke, it doesn’t get you a solution any sooner. How are they connected to the pi? Honestly, just provide the info from the template I provided…

Here is the log file: http://xbmclogs.com/pqs1fh3hs
like I said, I just turned on the system with all three HDDs connected and did nothing else.

Believe me it’s not! They get their power from the grid, not from the Pi, still, they are simultaneously connected to the Raspberry Pi over the USB ports, and I do lose my files. Thank you for looking into it!

Have you set usb_max_current in config.txt? If you are connecting multiple drives they may be pulling the 5V down even if they are “self powered”

You turned on the system then created logs?

Might be a good idea to cause the error to happen and then share the logs.

Haven’t changed a thing in the settings… I installed OSMC and connected the HDDs, that’s it. So you think it might be a good idea to only use one at the time or try changing the settings and hope it doesn’t happen any more?

Yes I know. But like I said: how should I do that without knowing when and which files are going to be deleted next? Even after several months, I can’t see a pattern so far. If you can tell me how to reproduce the problem I’ll do it and provide you the logs gladly! Should I just navigate to a folder where it happened? Should I watch an episode of a series and “hope” files in this folder are being deleted? I really don’t know…

The link I previously posted above seems to have been quite avoided by you. You’ve begun by providing us with quite a vague description of your symptom and almost none of the detail requested in the link. Following instructions I provided and using MyOSMC log uploader as advised would have yielded far more relevant info than the snippet you provided.

I honestly have to say that skorm is not the only one with this problem.
I still got the same one also with a 2TB hard drive from Western Digital. Sometimes still the same Folder is completely cleared and I don’t know why. The last time this happend to me I mentioned that the system randomly plugged out the USB hard drive (the drive is powered by grid with the original power supply adapter!). After that I connected the hard drive to my mac and, what a surprise, the same folder was cleared with all sub-folders and video files.
I will upload the logs files the next time this happens. A solution might be to change the ExFat Driver but I don#t know if this will solve the problem (I will try it when I have enough time).

1 Like

Same issue here. I also a Western Digital HDD (1.5 TB).
Sometimes the whole content of a folder is “cleared” and sometimes some other single files in a folder disappears. And sometimes other files looks like has been corrupted, when I analyze the folder some files has less size than they should have. Usually the files/folders affected are the ones recently used. It has been happening to me for months. :frowning:

I have been having this exact same problem. I haven’t noticed this issue with movies (might have happen), but the content of tv shows are constantly disappearing, usually the whole content of a season folder. My drive is also a WD, think it’s weird that it might be a HD problem, but since everyone is mentioning it. Anyone has a solution for this?

@Cesar_Ribeiro 1 year later way to resurrect a thread from the dead, logs btw its a good start so follow the topic on how to provide a log and comeback with that.

This thread is almost two years old.

I’m almost certain that the user has experienced a disk failure. To test for potential regressions, you could try an older version of OSMC

Cheers

Sam

I can’t provide a solution, but I’d like to share what I experienced. Back than I just stopped using the library and played the files directly from videos>files>HD>folder. It was not as comfortable but for some reason it worked and I haven’t lost an episode ever since. A couple of months ago when I updated the system I tried to scan the files to the library again and everything works fine now. I’m still using the same HDs as 1.5 years ago so I’m sure it wasn’t a disk failure!

use use smartmontools and check the hdd if your so sure about the hdd

Don’t think smartctl can request SMART data over USB Mass Storage.

Some can do that, not all but some