Mounting NAS to save recordings to

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
$tocK Offline
Junior Member
Posts: 10
Joined: Sep 2014
Reputation: 0
Post: #1
Hi All,

I am actually using Openelec on my Raspberry pi and have started to use the TVHeadend front and back end features.

I have been able to get the device to watch live TV and have also been able to record TV to the Pi's SD card storage.

I tried to mount the CIFS share from my NAS to record to and it worked. But when I record something to the NAS it creates a file with the correct name but the size is always 0KB, even if i record for 1hr+.

Can anyone help me with this? I don't see what i have done wrong.

Regards,

$tocK
find quote
mrpg Offline
Member
Posts: 82
Joined: Sep 2010
Reputation: 0
Post: #2
permissions on the nas share? can the hts user write to it? (sudo su hts - touch /yournas/share/test.txt)

Br
Patric
find quote
$tocK Offline
Junior Member
Posts: 10
Joined: Sep 2014
Reputation: 0
Post: #3
Hi Patric,

I tried what you said and this is what i got in return:

Code:
sudo su hts - touch /storage/recordings/tvrecordings/test.txt

There is no working 'sudo'.

On debian/ubuntu/all general purpose linux distributions 'sudo'
allows a permitted user to execute a command as the superuser
or another user, as specified by the security policy

With OpenELEC you have root access by default, so you dont need 'sudo'

so then i tried:

Code:
su hts - touch /storage/recordings/tvrecordings/test.txt
su: unknown user hts

I then tried just plain:

Code:
nano /storage/recordings/tvrecordings/test.txt

and was able to get into the file, however when i went to save it, it said permission denied. The file was created on the share though....

Now i had a look at my NAS to check out the permissions of this share and this is what it is set to:

Guest access is allowed,

Owner RWX
Group RWX
Other RWX

Therefore i do not see why it cant write anything to the file??

Is there supposed to be a hts user?

Confused

Please help.

Regards,

$tocK
find quote
mrpg Offline
Member
Posts: 82
Joined: Sep 2010
Reputation: 0
Post: #4
Hi,

ah openelec, i have not used that myself, so unsure as to what user in tvheadend that is used to save the recording.

But strange that you cannot edit the file even as root.

What nas is it? , how is it mounted? nfs or cifs? , what does your mount line in fstab look like?

Br
Patric
find quote
$tocK Offline
Junior Member
Posts: 10
Joined: Sep 2014
Reputation: 0
Post: #5
Hi,

My NAS is an HP Microserver N40L, running freenas9.

It is a CIFS share.

It is being mounted by a line of code on the autostart.sh file. it looks like this.

Code:
#!/bin/sh
(sleep 30; \
mount -t cifs -o username=********,password=*********,rw,sec=ntlm //192.168.10.135/Media/Recording/TVRecording /storage/recordings/tvrecordings; \
)&

I don't think i have changed anything in fstab?

Regards,

$tocK
(This post was last modified: 2014-09-07 09:25 by $tocK.)
find quote
KRA77 Online
Senior Member
Posts: 291
Joined: Jul 2010
Reputation: 0
Post: #6
How about using NFS rather than CIFS/SMB ?
find quote
$tocK Offline
Junior Member
Posts: 10
Joined: Sep 2014
Reputation: 0
Post: #7
I haven't tried that yet, I will give it a go tonight and see how it goes.

Thanks.
find quote