[mythtv-users] Migrating recordings to a NAS

Michael T. Dean mtdean at thirdcontact.com
Sun Oct 11 18:25:11 UTC 2009


On 10/11/2009 10:09 AM, William wrote:
> Michael T. Dean wrote:
>> On 10/11/2009 07:22 AM, William wrote:
>>> Not quite true. It will only delete files to make more room if its 
>>> actually recording something. If not, you will run out of room. The 
>>> thread only runs when something is recording.
>>
>> It runs all the time, it only deletes when more room is needed for 
>> recording stuff.
>>
>>> This is a sucky feature of myth.
>>
>> IMHO, MythTV's deleting recordings when it doesn't need to delete 
>> them would be a sucky feature.  If you had told Myth to keep 5GB free 
>> and you needed to temporarily copy a 4GB file to the Myth box, do you 
>> /really/ want Myth to delete 4+GB of recordings before you delete the 
>> 4GB file?
> yes, absolutely. (Files sent to the NAS will be there a while as the 
> NAS only contains videos. Local storage is for temp files.)  Because 
> if it did, I would set the free space to 1 gig assuming that the 
> response time to running out of space is fairly quick. A scan every 15 
> seconds would be enough.  I can copy a 4 gig file in less than 1 
> minute. However my typical problem occurs when downloading videos from 
> various sources so I only get ~1 MB/sec of writing to the drives. (The 
> downloading software is running on the NAS server.) In that case, a 
> check every few minutes would be fine. I would also be happy with an 
> external script that would simply scan the database and delete the 
> oldest expirable recording and update the database when triggered by a 
> low space condition. I am tempted to write one for myself, controlled 
> by monit, just need to figure out the complicated sql commands need

Don't use SQL.  Don't touch the database.

> to properly delete a recording and remove all data from the database.

Send mythbackend a command to delete the recording using the mythtv 
protocol, as provided by the bindings.  I think the python bindings are 
the best choice for the upcoming 0.22.

And, if using the deleted recgroup, use: 
http://svn.mythtv.org/trac/browser/trunk/mythtv/contrib/maintenance/flush_deleted_recgroup.pl 
or the Python-bindings equivalent.

But I stand by my statement that filesystem maintainance for non-MythTV 
files is /not/ MythTV's job.

Mike


More information about the mythtv-users mailing list