Tvheadend on zentyal 3
#1
Hello,

sorry for my bad english.

I run XBMC on a Zbox, on the media server is running Zentyal 3 and Tvheadend with dvbs-2 card.
Everything runs clean.

Tvheadend recording folder is /mnt/2TBHDD on a second hard drive.

But Tvheadend records nothing :-(


Who can help me?

Mario
Reply
#2
Upload a copy of syslog (or equivalent), please - that should show tvheadend trying to record and maybe give some clues as to why it's failing.

My suspicion would be permissions... does the tvheadend process (possibly user tvheadend) have write permission to the target directory?

Maybe also include a copy of your Recording config page in tvheadend, and an ls -la of /mnt.
Reply
#3
Hello Yaffle,

i think also that it is due to write permission, ls -la of mnt:

Code:
drwxrwxrwx   3 root root           4096 Sep 29 19:04 .
drwxr-xr-x  23 root root           4096 Okt  1 10:11 ..
drwxrwx---+  5 root Administrators 4096 Sep 29 19:19 2TBHDD

On Zentyal i have setup users x and y, they should have access (rw) to these recordings.

I could find no log files of Tvheadend :-(

Mario
Reply
#4
Use chown/chgrp/chmod to fix permissions on the mount.
Reply
#5
chown / chgrp / chmod I have already tried the settings are reset at reboot :-(
Reply
#6
I tested mount sdb1 -> /media/2TBHDD

default output of sudo ls -la of /media/2TBHDD :
Code:
mario@mm-server:~$ sudo ls -la of /media/2TBHDD
[sudo] password for mario:
ls: cannot access of: No such file or directory
/media/2TBHDD:
total 56
drwxrwx---+  6 root Administrators  4096 Okt  5 09:59 .
drwxr-xr-x   5 root root            4096 Okt  5 09:46 ..
drwxrwx---+ 11 root Administrators  4096 Okt  5 11:31 Aufnahmen
drwxrwx---+  2 root Administrators  4096 Okt  5 09:59 Daten
drwxrwx---+ 10 root Administrators  4096 Okt  5 10:04 Filme
drwxrwx---+  2 root Administrators 16384 Sep 29 18:26 lost+found

(Aufnahmen = Tvheadend recording folder)

I try:
Code:
sudo chown -R root:video /media/2TBHDD

then sudo ls -la of /media/2TBHDD[/code]:
Code:
mario@mm-server:~$ sudo ls -la of /media/2TBHDD
ls: cannot access of: No such file or directory
/media/2TBHDD:
total 56
drwxrwx---+  6 root video  4096 Okt  5 09:59 .
drwxr-xr-x   5 root root   4096 Okt  5 09:46 ..
drwxrwx---+ 11 root video  4096 Okt  5 11:31 Aufnahmen
drwxrwx---+  2 root video  4096 Okt  5 09:59 Daten
drwxrwx---+ 10 root video  4096 Okt  5 10:04 Filme
drwxrwx---+  2 root video 16384 Sep 29 18:26 lost+found

At this point Tvheadend can record.

After a server reboot sudo ls -la of /media/2TBHDD :
Code:
mario@mm-server:~$ sudo ls -la of /media/2TBHDD
[sudo] password for mario:
ls: cannot access of: No such file or directory
/media/2TBHDD:
total 56
drwxrwx---+  6 root Administrators  4096 Okt  5 09:59 .
drwxr-xr-x   5 root root            4096 Okt  5 09:46 ..
drwxrwx---+ 11 root Administrators  4096 Okt  5 11:31 Aufnahmen
drwxrwx---+  2 root Administrators  4096 Okt  5 09:59 Daten
drwxrwx---+ 10 root Administrators  4096 Okt  5 10:04 Filme
drwxrwx---+  2 root Administrators 16384 Sep 29 18:26 lost+found

Huh
Reply
#7
I'd check:
  • Who's the owner of the mount point, and what are the permissions on that when 2TBHDD isn't mounted? These are probably your defaults (guessing, though, as I rarely use external drives)
  • How are you mounting it - default automount (not sure how that works in Zentyal), /etc/fstab, pmount? You may need to specify parameters on mounting to overcome mounting as rw to root only (e.g. the -o parameter)
  • Under what UID is the tvheadend process running (ps -eaf | grep tvheadend)? That's the user who needs read/write access to this drive, not mario or anyone else (unless you're running it as mario, of course!).
  • Check GID as well. I suspect tvheadend is running as tvheadend:video, and your default ownership is root:administrators, so you can try to mount owned as tvheadend, as group video (your chown command, above) or give other rw permission (maybe undesirable, depends on your config).

Useful information here: https://help.ubuntu.com/community/Mount/USB

(tvheadend logs to /var/log/syslog or similar - it basically writes to the default system log, so you'd see messages there as recordings start and finish - like this:

Code:
Oct  4 19:58:30 Server tvheadend[1462]: dvr: "Marvel's Agents of S.H.I.E.L.D." on "Channel 4 HD" recorder starting
Oct  4 19:58:30 Server tvheadend[1462]: subscription: "DVR: Marvel's Agents of S.H.I.E.L.D." subscribing on "Channel 4 HD", weight: 300, adapter: "Sony CXD2820R", network: "Gloucestershire", mux: "Gloucestershire: 482,200 kHz", provider: "", service: "Channel 4 HD", quality: 100
Oct  4 19:58:32 Server tvheadend[1462]: dvr: /vol0/public/Videos/Recordings/Channel 4 HD/Marvel_s Agents of S.H.I.E.L.D..2013-10-04.20-00.ts from adapter: "Sony CXD2820R", network: "Gloucestershire", mux: "Gloucestershire: 482,200 kHz", provider: "", service: "Channel 4 HD"
Oct  4 19:58:32 Server tvheadend[1462]: dvr:  #  type              lang  resolution  aspect ratio  sample rate  channels
Oct  4 19:58:32 Server tvheadend[1462]: dvr:  1  H264                    ?           ?
Oct  4 19:58:32 Server tvheadend[1462]: dvr:  2  AAC               eng                             ?            ?
Oct  4 19:58:32 Server tvheadend[1462]: dvr:  3  AAC               eng                             ?            ?
Oct  4 19:58:32 Server tvheadend[1462]: dvr:  4  DVBSUB            eng  
Oct  4 21:03:00 Server tvheadend[1462]: subscription: "DVR: Marvel's Agents of S.H.I.E.L.D." unsubscribing from "Channel 4 HD"
Oct  4 21:03:00 Server tvheadend[1462]: dvr: Recording completed: "/vol0/public/Videos/Recordings/Channel 4 HD/Marvel_s Agents of S.H.I.E.L.D..2013-10-04.20-00.ts"
Oct  4 21:03:00 Server tvheadend[1462]: dvr: "Marvel's Agents of S.H.I.E.L.D." on "Channel 4 HD": End of program: Completed OK

For future reference, you can see what time the recording started, what it recorded, to where it was recorded, the streams it recorded, and so on).
Reply
#8
Hi Prof Yaffle,

i mount the 2 TB HDD in /etc/fstab :
# mount sbd1 (Data HDD)
UUID=43bd3db9-bb17-4865-1254ertvv34r /media/2TBHDD ext3 rw,suid,dev,exec,acl,auto,users,async 0 2

It's an internal HDD.

Wenn i chown -R root:video /media/TBHDD it works fine.
The problem is after reboot the owner of /media/2TBHDD is changed to root:Administrator.

ps -eaf | grep tvheadend =
hts 1014 1 3 16:08 ? 00:00:34 tvheadend -f -u hts -g video
Reply
#9
Unmount the drive and check the permissions/ownership of the mount point - see if you can change those and then remount. I'm no expert on drive mounting, so maybe someone else will happen along, but you may simply be inheriting the default permissions as I suggested above.

The ps says that tvheadend is running as hts:video, which is why it can only write when you chown'ed the directories to root:video - then, you had the right group permissions to write.

1. See if you can change the mount point to root:video before mounting, or
2. See if you can chmod the mount point to 775 before mounting to give u=rwx g=rwx o=rw
Reply

Logout Mark Read Team Forum Stats Members Help
Tvheadend on zentyal 30