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

Thomas Boehm mythtv-users at lists.boehmi.net
Sat Nov 26 17:32:36 UTC 2016


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


More information about the mythtv-users mailing list