Mailing List Archive

MythTV not really deleting files
My 6TB storage drive is full. Within MythTV it says I have 855 files
taking about 2TB, but in Ubuntu it says my storage folder has 4501 items
taking 5.6TB. Most of the files in there appear to be MythTV video
files. It seems like the system isn't really deleting the files from the
computer when I delete in MythTV. How can I fix this?

Lloyd

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On Fri, 15 Dec 2023 at 14:21, Lloyd <lloydc23@gmail.com> wrote:

> My 6TB storage drive is full. Within MythTV it says I have 855 files
> taking about 2TB, but in Ubuntu it says my storage folder has 4501 items
> taking 5.6TB. Most of the files in there appear to be MythTV video
> files. It seems like the system isn't really deleting the files from the
> computer when I delete in MythTV. How can I fix this?
>
> Lloyd
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org



Default behaviour is to retain deleted recordings until the space is
required for new ones. They sit in the 'Deleted Recordings' group and can
be undeleted (which I find useful sometimes)

There are various parameters you change, such as how many days to retain
deleted recordings for, and how much 'free space' to maintain on the
recording drive.
Re: MythTV not really deleting files [ In reply to ]
There are very few things in the deleted recordings group. These appear to
be old mythTV recordings that no longer appear in the app, but are still on
the disc.

Lloyd

On Fri, Dec 15, 2023, 8:31?AM David Watkins <watkinshome@gmail.com> wrote:

>
>
> On Fri, 15 Dec 2023 at 14:21, Lloyd <lloydc23@gmail.com> wrote:
>
>> My 6TB storage drive is full. Within MythTV it says I have 855 files
>> taking about 2TB, but in Ubuntu it says my storage folder has 4501 items
>> taking 5.6TB. Most of the files in there appear to be MythTV video
>> files. It seems like the system isn't really deleting the files from the
>> computer when I delete in MythTV. How can I fix this?
>>
>> Lloyd
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>
>
>
> Default behaviour is to retain deleted recordings until the space is
> required for new ones. They sit in the 'Deleted Recordings' group and can
> be undeleted (which I find useful sometimes)
>
> There are various parameters you change, such as how many days to retain
> deleted recordings for, and how much 'free space' to maintain on the
> recording drive.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: MythTV not really deleting files [ In reply to ]
On 12/15/23 12:35, Lloyd Chittenden wrote:
> There are very few things in the deleted recordings group. These
> appear to be old mythTV recordings that no longer appear in the app,
> but are still on the disc.
>
> Lloyd

There is a problem with the delete pending flag, which can result in
recordings in limbo.

https://forum.mythtv.org/viewtopic.php?t=4735

https://forum.mythtv.org/viewtopic.php?f=36&t=2888

HTH

Peter

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On Fri, 15 Dec 2023 07:18:29 -0700, you wrote:

>My 6TB storage drive is full. Within MythTV it says I have 855 files
>taking about 2TB, but in Ubuntu it says my storage folder has 4501 items
>taking 5.6TB. Most of the files in there appear to be MythTV video
>files. It seems like the system isn't really deleting the files from the
>computer when I delete in MythTV. How can I fix this?
>
>Lloyd

Try using the find_orphans.py program to see if you have lots of
recording files that are not in the database. Google says it is here:

https://www.mythtv.org/wiki/Find_orphans.py

but the Wiki is down at the moment. I have not run it in quite a
while, so I am not sure if it has been kept up to date.

The MythTV forum also seems to be down.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On Saturday, 16 December 2023 03:51:58 GMT Stephen Worthington wrote:

> but the Wiki is down at the moment. I have not run it in quite a
> while, so I am not sure if it has been kept up to date.
>
> The MythTV forum also seems to be down.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Should be back up now, someone who knows what they're doing gave them a kick.
Unfortunately other MythTV systems are also playing up so please be patient.

--
Regards, Steve Goodey
Colchester, England
mailto://steve@goodey.org

Hello to Jason Isaacs



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On 12/15/23 19:56, Peter Bennett wrote:
>
> On 12/15/23 12:35, Lloyd Chittenden wrote:
>> There are very few things in the deleted recordings group. These
>> appear to be old mythTV recordings that no longer appear in the app,
>> but are still on the disc.
>>
>> Lloyd
>
> There is a problem with the delete pending flag, which can result in
> recordings in limbo.
>
> https://forum.mythtv.org/viewtopic.php?t=4735
>
> https://forum.mythtv.org/viewtopic.php?f=36&t=2888
>
Fascinating!  I noticed my perl code was listing 235 several year old
files that I could not find in frontend.  Turned out it was this.  I
added a --delete option to my code to clean this up and recovered over
300GB!

Since I was in perl and not SQL, I opted to do this like
flush_deleted_recgroup.pl did.  This mostly worked, it caused backend to
start deleting the files one by one.  But after several dozen, he
started complaining:

Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
mythdbcon.cpp:238 (OpenDatabase) [DBManager870] Unable to connect to
database!
Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
mythdbcon.cpp:239 (OpenDatabase) Driver error was [1/1040]:#012QMYSQL:
Unable to connect#012Database error was:#012Too many connections
Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
mainserver.cpp:2411 (DoDeleteThread) MainServer: ERROR opening database
connection for Delete Thread for chanid 1181 recorded at
2021-01-20T14:30:00Z.  Program will NOT be deleted.

Does this indicate a bug that each delete is a new connection that
doesn't close?  Or did I do something wrong?  Backend restart got the
deletes going again.

My code is mainly for distributing auto expires over multiple recording
disks.  But now it also reports this, with optional cleanup, even if you
have just 1 disk.  I can contribute it if it might be useful to others:

    https://github.com/MythTV/mythtv/pull/849

-Tim


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On 1/31/24 01:39, Timothy Witham wrote:
> Since I was in perl and not SQL, I opted to do this like
> flush_deleted_recgroup.pl did.  This mostly worked, it caused backend
> to start deleting the files one by one.  But after several dozen, he
> started complaining:
>
> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
> mythdbcon.cpp:238 (OpenDatabase) [DBManager870] Unable to connect to
> database!
> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
> mythdbcon.cpp:239 (OpenDatabase) Driver error was [1/1040]:#012QMYSQL:
> Unable to connect#012Database error was:#012Too many connections
> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
> mainserver.cpp:2411 (DoDeleteThread) MainServer: ERROR opening
> database connection for Delete Thread for chanid 1181 recorded at
> 2021-01-20T14:30:00Z.  Program will NOT be deleted.
>
> Does this indicate a bug that each delete is a new connection that
> doesn't close?  Or did I do something wrong?  Backend restart got the
> deletes going again.

What version of MythTV are you running? I remember this bug was reported
years ago and was  fixed. Maybe the bug is back?

Peter

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On 1/31/24 08:31, Peter Bennett wrote:
>
> On 1/31/24 01:39, Timothy Witham wrote:
>> Since I was in perl and not SQL, I opted to do this like
>> flush_deleted_recgroup.pl did.  This mostly worked, it caused backend
>> to start deleting the files one by one.  But after several dozen, he
>> started complaining:
>>
>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
>> mythdbcon.cpp:238 (OpenDatabase) [DBManager870] Unable to connect to
>> database!
>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
>> mythdbcon.cpp:239 (OpenDatabase) Driver error was
>> [1/1040]:#012QMYSQL: Unable to connect#012Database error was:#012Too
>> many connections
>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
>> mainserver.cpp:2411 (DoDeleteThread) MainServer: ERROR opening
>> database connection for Delete Thread for chanid 1181 recorded at
>> 2021-01-20T14:30:00Z.  Program will NOT be deleted.
>>
>> Does this indicate a bug that each delete is a new connection that
>> doesn't close?  Or did I do something wrong?  Backend restart got the
>> deletes going again.
>
> What version of MythTV are you running? I remember this bug was
> reported years ago and was  fixed. Maybe the bug is back?
>
mythbackend version: fixes/33
[v33.1+fixes.202401260819.512d723c83~ubuntu20.04.1] www.mythtv.org

-Tim


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On 1/31/24 10:21, Timothy Witham wrote:
>
> On 1/31/24 08:31, Peter Bennett wrote:
>>
>> On 1/31/24 01:39, Timothy Witham wrote:
>>> Since I was in perl and not SQL, I opted to do this like
>>> flush_deleted_recgroup.pl did.  This mostly worked, it caused
>>> backend to start deleting the files one by one.  But after several
>>> dozen, he started complaining:
>>>
>>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E
>>> DeleteThread mythdbcon.cpp:238 (OpenDatabase) [DBManager870] Unable
>>> to connect to database!
>>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E
>>> DeleteThread mythdbcon.cpp:239 (OpenDatabase) Driver error was
>>> [1/1040]:#012QMYSQL: Unable to connect#012Database error was:#012Too
>>> many connections
>>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E
>>> DeleteThread mainserver.cpp:2411 (DoDeleteThread) MainServer: ERROR
>>> opening database connection for Delete Thread for chanid 1181
>>> recorded at 2021-01-20T14:30:00Z.  Program will NOT be deleted.
>>>
>>> Does this indicate a bug that each delete is a new connection that
>>> doesn't close?  Or did I do something wrong?  Backend restart got
>>> the deletes going again.
>>
>> What version of MythTV are you running? I remember this bug was
>> reported years ago and was  fixed. Maybe the bug is back?
>>
> mythbackend version: fixes/33
> [v33.1+fixes.202401260819.512d723c83~ubuntu20.04.1] www.mythtv.org
>
> -Tim
>
>
>
Please report that as a bug in MythTV issues in github.

Peter

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On 31/01/2024 17:03, Peter Bennett wrote:
>
> On 1/31/24 10:21, Timothy Witham wrote:
>>
>> On 1/31/24 08:31, Peter Bennett wrote:
>>>
>>> On 1/31/24 01:39, Timothy Witham wrote:
>>>> Since I was in perl and not SQL, I opted to do this like
>>>> flush_deleted_recgroup.pl did.  This mostly worked, it caused
>>>> backend to start deleting the files one by one.  But after several
>>>> dozen, he started complaining:
>>>>
>>>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E
>>>> DeleteThread mythdbcon.cpp:238 (OpenDatabase) [DBManager870] Unable
>>>> to connect to database!
>>>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E
>>>> DeleteThread mythdbcon.cpp:239 (OpenDatabase) Driver error was
>>>> [1/1040]:#012QMYSQL: Unable to connect#012Database error
>>>> was:#012Too many connections
>>>> Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E
>>>> DeleteThread mainserver.cpp:2411 (DoDeleteThread) MainServer: ERROR
>>>> opening database connection for Delete Thread for chanid 1181
>>>> recorded at 2021-01-20T14:30:00Z.  Program will NOT be deleted.
>>>>
>>>> Does this indicate a bug that each delete is a new connection that
>>>> doesn't close?  Or did I do something wrong?  Backend restart got
>>>> the deletes going again.
>>>
>>> What version of MythTV are you running? I remember this bug was
>>> reported years ago and was  fixed. Maybe the bug is back?
>>>
>> mythbackend version: fixes/33
>> [v33.1+fixes.202401260819.512d723c83~ubuntu20.04.1] www.mythtv.org
>>
>> -Tim
>>
>>
>>
> Please report that as a bug in MythTV issues in github.
Surely "too many connections" suggests a MySQL configuration issue
rather than a MythTV bug?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: MythTV not really deleting files [ In reply to ]
On 1/31/24 11:44, Jan Ceuleers wrote:
> On 31/01/2024 17:03, Peter Bennett wrote:
>> Please report that as a bug in MythTV issues in github.
https://github.com/MythTV/mythtv/issues/851
> Surely "too many connections" suggests a MySQL configuration issue
> rather than a MythTV bug?

My backup system shows the 100 max_connections was not there in 2015 but
was there by 2016 and has been unchanged for the 8 years since.  I don't
recall putting the limit there, maybe some package did?  But seems
reasonable to me, why should mythtv need > 100 connections to do serial
deletes?

Thanks!

-Tim


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org