Project

General

Profile

Recording to NAS drive rejected

Added by jim dods almost 6 years ago

Hi all, sorry to seek help, but I have tried everything I know.

I have a NAS drive - one partition with FS NTFS and one with FS ext4 (supposed to be faster for Linux). I am using a RasPi 3 as the server. I am able to mount the NTFS and ext4 drives on the RasPi. I have given them permissions to read/write, and have them mount in /etc/fstab. I am able to record fine to the NTFS partition when i point to that mount in TVH. However, when i do the same for the ext4 drive, recording starts, then completes right away. It does not record, and leaves a 0kb file on the drive.

This is my /etc/fstab line for the ext4 (the same as the NTFS, other than file locations).
//192.168.1.1/RouterPVR/PVR /media/RouterPVR cifs username=XXX,password=YYY,iocharset=utf8,vers=1.0,sec=ntlmssp,nofail 0 0

I keep thinking it has to be permissioning issue, but I have done the same steps on each folder, and also gave permission to the parent /media dir. Is it not possible to record to a second partition on an external HDD? Does ext4 need an extra identifier?

Appreciate any suggestions. Thank you.


Replies (11)

RE: Recording to NAS drive rejected - Added by Joe User almost 6 years ago

That line is for cifs...
How is the drive exported?
Do recordings end up in finished,failed or removed and what is their status?

RE: Recording to NAS drive rejected - Added by jim dods almost 6 years ago

Thank you for replying. As it is a network drive (not attached to the pi) I used cifs. Not sure that is right, but also tried to use "ext4" there, and it threw an error when trying to mount the drive. With cifs I was able to mount the drive, and can r/w to that folder outside of TVH.

When I try to record to it with that setting, it puts a 0kb file there, and it shows up under failed recordings showing "file not created" in TVH.

Thank you.

RE: Recording to NAS drive rejected - Added by Joe User almost 6 years ago

You should be using NFS to mount an ext4 partition from linux. It will give you better performance and less security/permissions issues.

RE: Recording to NAS drive rejected - Added by jim dods almost 6 years ago

Thank you Joe.

So would I just replace cifs with NFS? Like this? will try to test shortly.

//192.168.1.1/RouterPVR/PVR /media/RouterPVR NFS username=XXX,password=YYY,iocharset=utf8,vers=1.0,sec=ntlmssp,nofail 0 0

EDIT - doing some reading, I have tried it as
192.168.1.1:/RouterPVR/PVR /media/RouterPVR nsf defaults 0 0

I get an error saying failed to resolver server 192.168.1.1/RouterPVR: name or service not known.

RE: Recording to NAS drive rejected - Added by jim dods almost 6 years ago

I am using DD-WRT on my router for the NAS. It looks like DD-WRT does not support NFS server, so unfortunately unable to use NFS in this case.

I formatted it so that full drive is ext4, and can mount drive and rw to it, but it will not record to it. Any other ideas? Is TVH not able to record to a ext4 formatted drive?

RE: Recording to NAS drive rejected - Added by Joe User almost 6 years ago

I record to nfs mounted ext drives all the time. The problem is probably cifs, it is not a tvheadend problem.

Check your cifs configuration and look into "sticky bits".
[[https://serverfault.com/questions/118915/cifs-mounted-drive-setting-stick-bit-on-all-files-cannot-change-permissions-o]]

Also, there is a unfsd package that implements a user space nfs server, but I never tried it.

RE: Recording to NAS drive rejected - Added by Hiro Protagonist almost 6 years ago

jim dods wrote:

I am using DD-WRT on my router for the NAS. It looks like DD-WRT does not support NFS server, so unfortunately unable to use NFS in this case.

I formatted it so that full drive is ext4, and can mount drive and rw to it, but it will not record to it. Any other ideas? Is TVH not able to record to a ext4 formatted drive?

TVH is quite capable of recording to an ext4 formatted drive, however this is not what you're trying to do. You're trying to record to a network share which is a different kettle of fish. The fileserver has to deal with the filesystems attached to it [in this case NTFS & ext4], the remote system [your TVH server] sees a pseudo filesystem via the network [e.g. cifs or nfs].

Your statement 'ext4 (supposed to be faster for Linux)' is true for directly attached devices, ext4 has much lower CPU overhead than NTFS, but this only impacts the device directly mounting the filesystem, it doesn't impact device mounting the filesystem as a network share.

Generally nfs will also provide better performance than cifs, but if you don't have the option of nfs, and cifs is working for you, I would stick with that, and as the choice of filesystem on the file server will only impact that device, and sharing ext4 via cifs is likely to be a poor fit, again I'd say if NTFS is working, I don't see any great advantage in changing.

If you were mounting a hard drive directly to the Pi, definitely use ext4 over NTFS, but via a network share, your pi is isolated from the remote filesystem overhead.

RE: Recording to NAS drive rejected - Added by Joe User almost 6 years ago

I agree with Hiro, except that he is running a router, which will run into CPU issues much quicker than other hardware. If you are not experiencing any issues, go ahead with an NTFS partition, but if you plan on doing multiple recordings/playback at the same time it would be wise to try to make it as efficient as possible (before disk is half full of recordings...).

While unfsd will not perform as well as a kernel version, I would guess that unfsd with an ext4 partition would have better performance than using the NTFS drivers for linux.

RE: Recording to NAS drive rejected - Added by jim dods almost 6 years ago

Thanks for all the feedback. So there are two issues here -- 1) my router does not allow NFS, so unable to do that. and 2) TVH will not record to a ext4 formatted drive over the network (using CIFS) -- i did put it on the pi, and it does record there, but I seem to get lockup issues when I have the drive connected to the pi.

So, despite a performance hit, I might have to stick with NTFS over CIFS if i stay on the NAS/router.

Thanks again for the help.

RE: Recording to NAS drive rejected - Added by Hiro Protagonist almost 6 years ago

jim dods wrote:

2) TVH will not record to a ext4 formatted drive over the network (using CIFS)

This issue is actually nothing to do with TVH.

-- i did put it on the pi, and it does record there, but I seem to get lockup issues when I have the drive connected to the pi.

A beefier PSU on the Pi, or connecting the drive via a powered hub would probably solve that problem.

RE: Recording to NAS drive rejected - Added by Joe User almost 6 years ago

jim dods wrote:

1) my router does not allow NFS

You can install unfsd.
[[https://wikidevi.com/wiki/WikiDevi:DD-WRT/NFS_(unfsd)_on_Optware]]

    (1-11/11)