mythtv and cifs (samba)

Posted on Tuesday, September 22, 2009 by Nicki

Due to some error in the linux NFS client, I had to use CIFS to mount the storage from FreeNAS on my mythbuntu box. This seems to have created a new issue, whereby recordings do not get deleted by the backend due to "Text file busy" errors.



Because my storage was eventually going to fill up, I wrote a script to delete the recordings from the database and filesystem, and scheduled it in cron. It only deletes recordings that have been watched and with autoexpire on older than 14 days, plus LiveTV recordings with autoexpire on older than 7 days.

The myth.find_orphans.pl script was in a .gz in the referenced directory, so I had to uncompress and chmod it.

mysql -u mythtv -ppassword mythconverg -e "delete from recorded where autoexpire=1 and watched=1 and endtime < curdate() - 14;"
mysql -u mythtv -ppassword mythconverg -e "delete from recorded where storagegroup='LiveTV' and autoexpire > 0 and endtime < curdate() - 7;"
/usr/share/doc/mythtv-backend/contrib/myth.find_orphans.pl --dodelete


0 Responses to "mythtv and cifs (samba)":