[mythtv-users] Database / storage housekeeping

Brian Wood beww at beww.org
Thu Mar 30 20:41:15 UTC 2006


On Mar 30, 2006, at 1:20 PM, Bryan Halter wrote:

> Jeff Simpson wrote:
>
>> I recently happened to come across this error in my database logs:
>>
>> ERROR when trying to autoexpire file:
>> /mnt/store//1311_20060213220000_20060213220000.nuv. File doesn't
>> exist. Database metadata will not be removed.
>>
>> Turns out that file didn't exist, but the entry was still in the  
>> logs.
>> Does this housekeeping task run all the time, and does it list ALL  
>> the
>> errors it finds, or just the first one? Reason I ask is because I
>> found a similar error yesterday (different file). I wonder if I  
>> have a
>> whole slew of missing files that I will find out about 1 day at a  
>> time.
>>
>> Is there a utility for checking the sanity of the database? Something
>> that compares the file list to the database and vice versa, tells you
>> about files that aren't in the database and database entries with no
>> files attached. I'm especially interested to see if there are any
>> unattached files, as they are effectively wasting space on the  
>> mythbox.
>>
>> (yes, I know I can go through them one at a time or write a script to
>> do it, I'm just wondering if one already exists before I spend  
>> time on it)
>>
>>  - Jeff
>>
>>
>>
>>
> The thread runs when it finishes a recording and it tries to  
> autoexpire
> a recording.  I don't have my db in front of my but you could dome  
> some
> SQL to pull out all the file names the DB thinks exist and `ls` on the
> storage drive then send them through diff and see what's in one but  
> not
> the other.
>

So did the OP correct the problem ? Just "touch" the missing file and  
it will then have something to delete and can go ahead and delete the  
metadata.

I'm not sure if this behavior is a good thing or not, it alerts you  
to a problem, *if* you read the logs, which most people don't.

I suppose if you had a lot of files stored on an NFS filesystem and  
the network failed you wouldn't want the system to delete all of the  
metadata associated with those files.


More information about the mythtv-users mailing list