[mythtv-users] find_orphans.py problem with recordings on samba share

Mike Perkins mikep at randomtraveller.org.uk
Sun Nov 27 10:46:00 UTC 2016


On 27/11/16 09:08, Hika van den Hoven wrote:
> Hoi Thomas,
>
> Saturday, November 26, 2016, 6:32:36 PM, you wrote:
>
>> On 24/11/16 00:57, Hika van den Hoven wrote:
>>> Not perc� as rights management under CIFS works slightly different
>>> then under Linux. You can set it up that you can create files, that
>>> you afterwards do not own and cannot delete!
>
>> The mythtv user could create and delete files in there. I did some
>> further testing.
>
>> I mounted the share with nfs. UID of the mythtv user on the backend is
>> the same as the UID of the owner of the share. Same result, recording
>> and playback work, but find_orphans.py still thinks almost all
>> recordings are orpaned.
>
>> As my backend is a VM with HDHomerun network tuners I created a new
>> virtual hard disk, copied all recordings to it and mounted it instead of
>> the share. Same result as above.
>
>> Now I re-activated the original backend from where I cloned everything
>> into the VM last weekend, mounted the NFS share (it's not feasible for
>> me to move the original storage back) and the problem is there too. So I
>> think the problem existed already without me noticing it.
>
>
>
>> Some hours later...
>
>> I think I cracked it :-)
>
>> Two of my recordings had a ' in their filename. I found some really
>> orphaned recordings with
>
>> for i in *.ts *.mpg *.mkv *.mp4;do
>>  j=$(mysql --defaults-file=/etc/mysql/debian.cnf \
>>  --skip-column-names mythconverg -e \
>>  "SELECT basename FROM recorded WHERE basename = \"$i\";")
>>     if [ "$j" == "" ];
>>       then rm -i "$i";
>>     fi;
>> done
>
>> After deleting them all seems good now.
>
>> Thomas
>
> How do you get recordings with a quote in the name?
>
Hogan's heroes? Charlie's Angels?

-- 

Mike Perkins



More information about the mythtv-users mailing list