[mythtv-users] MythTV 0.23 backend suddenly auto-expired a ton of recordings...
Michael T. Dean
mtdean at thirdcontact.com
Fri Aug 13 06:12:42 UTC 2010
On 08/13/2010 12:31 AM, f-myth-users wrote:
> From: "Michael T. Dean"
>
> > Again, though, in all my time with MythTV (since Feb 2004), there has
> > never been (TTBOMK) a case where "the autoexpirer went crazy". Its
> > failure mode has always been to stop expiring things when they needed
> > expiring (which usually results in a file system filling up). If
> > someone has information on a case where that's not true, I'd love to see it.
>
> Wasn't there some case where someone incorrectly specified a storage
> directory (I can't remember if it was a true SG---probably not because
> NFS would be unlikely there, but maybe it was a NAS...) at the root of a
> filesystem, instead of one level down, resulting in an NFS mount failure
> causing Myth to think the disk was full and expire everything? Yes,
> that's a user error, but the failure mode might not show up for a long
> time, and the punishment is rather severe... :) [Maybe this behavior
> has since been fixed somehow, though it's not immediately apparent to
> me how Myth would know, unless it's now smart enough to say, "Whoops,
> an attempted deletion apparently did nothing to the freespace---stop
> and complain."]
In that situation, the problem is actually the inverse... Assume that
the user has a file system mounted at:
/srv/mythtv/tv
where its parent
/srv/mythtv
is part of the root file system. If some file system failed to mount at
tv, then the /srv/mythtv/tv directory would be just another directory on
the root file system. Therefore, MythTV would see that file system as
having the amount of free space the root file system has.
If MythTV tried to record to that directory, it would potentially fill
up the root file system because it would have nothing to autoexpire (as,
chances are all the real recording directories are on other file systems
on other partitions or drives and not directories on the root file
system). So, since all the recordings exist on file systems other than
the one that's in use and needs more space, MythTV would not attempt to
expire anything since doing so would not help. So, rather than expiring
too much stuff, it would likely fill up a file system.
If, however, MythTV were set with an "Extra Disk Space" of 1GiB (the
default) and the root file system had, say, 10GiB free, then MythTV may
be able to get one or a few recordings on the file system before hitting
the 1GiB available space point. Once it hits that point, it would then
expire a recording from the root file system (one of the 1-3 other
recordings that exist on there)--meaning at worst case, you'd lose the
show you just recorded. However, all your older recordings that exist
on other file systems would be unaffected.
So, the idea of only putting subdirectories within file systems into
Storage Groups is to protect from filling up the "parent" file systems,
not really related to auto-expire (other than the "expire what I just
finished recording" situation mentioned above).
That said, it is still a /very/ good idea to only put subdirectories
within file systems into Storage Groups. (So, thanks for the reminder. :)
In other words, I think Chris Pinkham did a marvelous job at designing
Storage Groups and implementing them and the modifications required for
the auto-expirer for safety.
I really can not think of /any/ reason why MythTV would expire more
recordings than it needs to--other than deleting Live TV recordings that
are older than "LiveTV Max Age" (by default, 1 day) or, as Jim
mentioned, deleting Deleted recordings that are older than "Deleted Max
Age" (by default, disabled). Note that it makes no difference how a
recording got into the "LiveTV" or the "Deleted" recording
group--whether it was recorded through LiveTV or just put into a
recording group called LiveTV, or whether it was deleted with, "Auto
Expire Instead of Delete Recording" or just put into a recording group
called Deleted, the effect is the same, and it would be expired under
the same rules.
Mike
More information about the mythtv-users
mailing list