[mythtv-users] Backend Deleting Files for no Reason - *again*...

Michael T. Dean mtdean at thirdcontact.com
Tue Jan 14 04:23:48 UTC 2020


On 01/13/2020 09:58 PM, Greg Oliver wrote:
> This has been happening for quite some time now and it is finally 
> getting annoying since it happened on CBS and they offer no free 
> streaming.
>
> Just a simple message """
> N DeleteThread mainserver.cpp:2502 (DeleteRecordedFiles) 
> DeleteRecordedFiles - recording id 10569 filename 
> /ramdisk/mythtv/recordings/11101_20200108030000.ts
> """
>
> Does anyone know what backend debugs I need to turn on to trap these 
> messages?
>
> I do not want to turn on anything too extra since it is currently 
> running on an underpowered machine, but I do need to put an end to it.
>
> I have TB of free space and a single StorageGroup, so I know no 
> auto-expire is happening.
>

Backend log at default verbosity should tell you exactly why it's 
deleting the file (in lines above the one you quoted).

FWIW, the only reasons I can think of that MythTV would ever delete a 
recording without directly being told to do so by a user are: 1) the 
recording is in the Deleted recording group (make sure that's not the 
case on your recording rule), 2) the recording is Live TV (make sure the 
recording rule doesn't use the Live TV recording group), 3) the 
recording needs to be autoexpired for low disk space (check your 
threshold setting, too), 4) "record new and delete old" is set on the 
recording rule and you've reached the max recordings for the rule.

Note, too, that you might have problems with low disk space if you mount 
your recordings disk incorrectly (misconfigure your disk layout).  For 
example, if you specify /ramdisk/mythtv/recordings as a directory in 
your storage group and you also mount the recordings disk at 
/ramdisk/mythtv/recordings, then any time the disk is not mounted, 
MythTV will get the available disk space of the parent file 
system--which, if it's a ramdisk, could be too small.  Then if some 
automounter mounted the file system and MythTV is already in the process 
of autoexpiring a recording due to low disk space, it won't stop until 
the recording is gone.  The right way to configure your mount point is 
to use a subdirectory underneath the mount point--never use the mount 
point directory directly.  So, if /ramdisk/mythtv were the mountpoint 
for the 1TB+ disk and /ramdisk/mythtv/recordings were the directory for 
the storage group, the recordings directory doesn't exist until/unless 
the file system is mounted and, therefore, MythTV can't get a file 
system available space until/unless the file system is mounted.

Oh, and some users have seen files deleted without "user" interaction 
because they had MythWeb (or, I could imagine the MythTV Web Frontend) 
exposed to the Internet without proper authentication protection--in 
which case the person telling MythTV to do the deleting wasn't supposed 
to be a user.

Mike


More information about the mythtv-users mailing list