Disk activity question

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Disk activity question

reluctantflux
This isn't a bug, just an issue I'm having that I'd like to get some clarity so I can try to troubleshoot my system.

As short as I can, RecordedTVHD is watching folders on my NAS and is preventing drives on my NAS from spinning down to save HDD life and power since it sees RecordedTVHD accessing the folders as disk activity.

I have confirmed it's RecordedTVHD, because if I stop the service, my drives will spin down within 15 minutes (the timer I've set to spin down due to inactivity).

Now, I have tv and movie files across 9 drives, and all 9 drives have folders that are getting watched by RecordedTVHD, but only 5 of them refuse to spin down due to the service.  

How often and how does RecordedTVHD determine which subfolders to check?  

I'm using a self-built Unraid NAS, and I'm looking at solutions from that end as well (such as directory caching), but wanted to get a better sense of how your software is choosing to access certain directories.  

I thought it may have had something to do with new shows opposed to shows that have ended, but I've confirmed that I do have new shows on drives that are getting spun down.

Any help would be very much appreciated.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Disk activity question

TheMayor
Last that I checked, RTVHD watches the folders (that you told it to look at) in real time to see something new is added & then processes the new show, to add it to the list.



Reply | Threaded
Open this post in threaded view
|

Re: Disk activity question

reluctantflux
Right, but since my files are on an Unraid NAS, it does a storage pooling thing, and I'm not sure why some drives are showing active, and other inactive.

For example:

Drive A (active): \TV Shows\Castle\
Drive B (inactive): \TV Shows\Blacklist\

But RecordedTVHD is only pointed to \TV Shows\ Share, which from its perspective, both Castle and Blacklist folders are in the same root TV Shows.

So if it's scanning every subfolder, (i.e. Castle), then why is it not scanning the Blacklist folder?  

I figured I'd have to tackle this from the Unraid side, but was just curious if I could get more insight from the RecordedTVHD service end.  
Reply | Threaded
Open this post in threaded view
|

Re: Disk activity question

MJT Software
Administrator
In reply to this post by reluctantflux
I've thought about changing the way this works, but the service currently operates like this:

File Watchers are setup to monitor for new files. When those files are recognized they are added to the database if they have the appropriate metadata.

There is also a timer setup in the service that every X number of minutes it scans through all of your directories that it is watching to check and see if it is missing any files in the database. This is probably why your disks aren't going to sleep. This part is hard coded in right now so at this point I can't have you do anything to change the way this works.

When the Recorded TV HD interface first loads a "ScanAll" command is sent to the service for it to check and make sure nothing is missing. So in theory I could probably remove the timer in the previous paragraph and all would work properly, but some recordings may possibly not show up right away if when the File Watcher found the file, the metadata isn't properly saved yet.
Reply | Threaded
Open this post in threaded view
|

Re: Disk activity question

reluctantflux
Cool! Thanks for the info.  No need to change anything on my behalf, I'll get this figured out from the Unraid side with a directory caching plugin.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Disk activity question

reluctantflux
Actually, one more question.  If the watcher sees no new files, would it still read the metadata of the existing files?

I think it might be some unidentified files that it kept trying to read metadata from.  I've gone ahead and identified them all, so we'll see if that helps.  It was only 3 files, and I have 5 drives that won't spin down, so we'll see.  
Reply | Threaded
Open this post in threaded view
|

Re: Disk activity question

MJT Software
Administrator
The timer that is setup scans the file system and gets a list of files in the watched directories. The service then checks to see if the files are in the database. If they are not in the database, then it reads the metadata from the file that it needs to add to the database.