[mythtv-users] Autoexpire issues

Kirby Vandivort kvandivo at ks.uiuc.edu
Thu Sep 11 11:46:04 EDT 2003


Since we are talking about autoexpire issues....

So, I recently restarted my backend machine and the mount point where
the videos are store didn't get mounted at boot.

So, 10 minutes after mythbackend started, it happily went in and tried
to autoexpire everything.

Why, you ask?

Well, the code checks the number of bytes free on the disk, and apparently
the code returns 0 if the directory isn't even there.***  So, discovering
that, it decided to free up some space.

So, it deleted the oldest entry from the database.
and then it tried to delete the file from the disk.  It couldn't.. Duh..

Check to see how much disk space is free now.

Hmm.. still zero...
So, it deleted the new oldest entry from the database..
and then it tried to delete the file from the disk.  It couldn't.. Duh..


etc etc..

So, I ended up with 'recorded' being empty, and a bunch of files on the
disk that didn't have corresponding database entries.


So, it seems most reasonable that the code could check to see that the
file actually exists before it attempts to autoexpire it.


*** - I'm not sure this is right.  I have video being stored in
/mnt/store.  and /mnt/store is the mount point for /dev/xxxx.  So,
/mnt/store DID exist as a directory.  And that partition wasn't full
at the time...  So, I'm not sure what it was smoking at the time...
At any rate, if the code just checked for the existence of the disk file
before autoexpiring, it would fix the problem.

I have been planning to add this myself, but I'm busy working on getting
the gui screen responding for my 'recommendations' patch that I've been
working on for a while now.  Just thought I would provide this bit of
info if anyone out there wants to add it before I get to it.

K

On Thu, Sep 11, 2003 at 10:15:51AM -0500, m0j0.j0j0 wrote:
> I'm seeing some odd behavior from autoexpire (CVS 8/28). 
> 
> The mythbackend logs the following:
> 
> -Want 5 Gigs free but only have 4
> -Autoexpire deletes 2G file
> -Autoexpire deletes 4G file
> -Myth records 2G file
> -Want 5 Gigs free but only have 4
> -Autoexpire deletes 4G file
> -Autoexpire deletes 4G file
> 
> Seems odd that autoexpire would kick in after deleting 6G of data, but
> only recording 2G. Also, 'df' shows the partition as having 17G free, so
> the whole "under 5" warning is wrong.
> 
> I have several remote SMB shares mounted in this partition. Could that
> have an effect on autoexpire's calculating of free space. Those mounts
> are unrelated to any of the TV stuff.
> 
> Any thoughts?
> 
> Thanks,
> Joe
> 
> 

> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


-- 

Kirby Vandivort                      Theoretical and Computational Biophysics 
Email: kvandivo at ks.uiuc.edu          3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/    University of Illinois
Phone: (217) 244-5711                405 N. Mathews Ave
Fax  : (217) 244-6078                Urbana, IL  61801, USA


More information about the mythtv-users mailing list