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

Hika van den Hoven hikavdh at gmail.com
Sun Nov 27 09:08:53 UTC 2016


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?


Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list