Synology SPK for DVR Record Engine

Downloads & Instructions
Post Reply
321liftoff
Posts: 145
Joined: Sat Apr 17, 2010 4:22 am
x 1

Re: Synology SPK for DVR Record Engine

Post by 321liftoff »

Hi demonrik,

Good seeing you on the Synology thread! Upgrading my Qnap TS-219P+ to a Synology DS918+. I'm struggling to set the recording path to within a shared folder. Maybe this isn't possible?

I created a shared folder "Recordings" within /volume1/. I moved the HDHomeRunDVR directory from /volume1/ to /volume1/Recordings/. When I change the path in the GUI and start/stop the engine, the log shows invalid recording path. When I move this directory back within /volume1/ and change the path in the GUI back, all is okay.

I did a chown http on the Recordings directory to see if that would help. I also notice that the share directories are shown as blue text with green backgrounds, which appears to be "directory is writable by others apart from the owning user and group, and has not the sticky bit set (o+w, -t)." The HDHomeRunDVR directory is just blue text, which appears to be a "directory". Don't know if that difference is meaningful for this situation.

Any thoughts?

Code: Select all

/volume$ ls -l
drwxr-xr-x  1 http  http    70 May 24 19:42 HDHomeRunDVR
drwxrwxrwx+ 1 http  root    68 May 24 20:23 Recordings

stevefxp
Posts: 4
Joined: Sun Apr 08, 2018 1:20 pm

Re: Synology SPK for DVR Record Engine

Post by stevefxp »

Is there an option to add a link to the DVR Manager link in the Synology main menu? Would be immensely helpful!

It would also be helpful to be able to add a config option for the log files. I would like to record my content in one directory and have the logs in another directory.

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

stevefxp wrote: Mon Jun 04, 2018 7:46 pm Is there an option to add a link to the DVR Manager link in the Synology main menu? Would be immensely helpful!
I haven't been able to find out how
It would also be helpful to be able to add a config option for the log files. I would like to record my content in one directory and have the logs in another directory.
that requires Silicondust to make changes in the record engine as i cant do this by default
would be nice though

jasonl
Silicondust
Posts: 16801
Joined: Sun Oct 28, 2007 9:23 pm
x 56

Re: Synology SPK for DVR Record Engine

Post by jasonl »

Log data is intentionally stored in the record location as a means of reliably keeping the recording drive from being put to sleep. If the drive was allowed to sleep, it would cause problems for both clients trying to access the DVR and scheduled recordings trying to happen when the drive is asleep. Many multi-disk NAS devices stagger the spinup of drives to not overload the power supply, meaning it can take over a minute for the drives to become available, by which point the recording has failed and anyone wanting to watch live TV is posting to the forums about getting a DVR error.

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

321liftoff wrote: Thu May 24, 2018 6:45 pm Hi demonrik,

Good seeing you on the Synology thread! Upgrading my Qnap TS-219P+ to a Synology DS918+. I'm struggling to set the recording path to within a shared folder. Maybe this isn't possible?

I created a shared folder "Recordings" within /volume1/. I moved the HDHomeRunDVR directory from /volume1/ to /volume1/Recordings/. When I change the path in the GUI and start/stop the engine, the log shows invalid recording path. When I move this directory back within /volume1/ and change the path in the GUI back, all is okay.

I did a chown http on the Recordings directory to see if that would help. I also notice that the share directories are shown as blue text with green backgrounds, which appears to be "directory is writable by others apart from the owning user and group, and has not the sticky bit set (o+w, -t)." The HDHomeRunDVR directory is just blue text, which appears to be a "directory". Don't know if that difference is meaningful for this situation.

Any thoughts?

Code: Select all

/volume$ ls -l
drwxr-xr-x  1 http  http    70 May 24 19:42 HDHomeRunDVR
drwxrwxrwx+ 1 http  root    68 May 24 20:23 Recordings
Sorry - I missed this post somehow.
As you found out creating a Share doesn't necessarily set up the permissions. By default unless you enable user access it will be root only access to write to the share.. and thus the engine can't write to the folder.

I'll take a look later and see if I can spot something specific .
Did you just chown the folder, or do a '-R' to ensure that not only do you give access, but changes the internals of the folder.

321liftoff
Posts: 145
Joined: Sat Apr 17, 2010 4:22 am
x 1

Re: Synology SPK for DVR Record Engine

Post by 321liftoff »

demonrik wrote: Wed Jun 06, 2018 10:34 am I'll take a look later and see if I can spot something specific .
Did you just chown the folder, or do a '-R' to ensure that not only do you give access, but changes the internals of the folder.
I don't think a -R flag will help. Keep in mind, if the HDHomerunDVR directory is in /volume1/, everything works. When I move it within the Recordings shared folder (which I've set 777 permissions, opening it wide open) then it won't work. I think I'm missing something else.

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

321liftoff wrote: Thu Jun 07, 2018 2:11 pm
demonrik wrote: Wed Jun 06, 2018 10:34 am I'll take a look later and see if I can spot something specific .
Did you just chown the folder, or do a '-R' to ensure that not only do you give access, but changes the internals of the folder.
I don't think a -R flag will help. Keep in mind, if the HDHomerunDVR directory is in /volume1/, everything works. When I move it within the Recordings shared folder (which I've set 777 permissions, opening it wide open) then it won't work. I think I'm missing something else.
Sorry for slowness on this one.
I wanted to do some research as I found some stuff out..

Basically I think the issue is down to some changes Synology has made to the filesystem behavior in it's linux.
You will notice that if you ssh to the box and list the shares in /volume1/ that those that are created by the 'create share' tool all have a '+' at the end of the permissions. e.g.:

Code: Select all

dr-xr-xr-x+ 4 root         root          4096 Nov 24  2017 video
But if I create a folder then it doesn't have the '+', e.g.

Code: Select all

drwxr-xr-x  3 http         http          4096 Mar  3 14:38 HDHomeRunDVR
Thus I suspect that there is somewhere else that synology is setting up additional permissions outside the + which truly govern what the permissions are for the folder. I was able to finally add the http access through the following method
1. Go to the 'Shared Folder' tool in your Control Panel
2. Select the shared folder you wish to use for the DVR
3. Make sure 'Restrict access to administrators only' is not selected/ticked.
4. Hit 'Edit' to edit it's permissions
5. Select the 'Permissions' Tab
6. Where you see 'Local users' select the drop down to 'Local groups'
7. Select the Check Mark for 'Read/Write' access for the 'http' group
8. Select OK

After doing this I was successfully able to write files as the http user in the folder.
Unfortunately, my research didn't find a way for me to automate this.. So for now you have to manually do above. But once you do it once then it's good forever :)

FWIW - I did check and you can add an existing folder (e.g. HDHomeRunDVR) as a share. Just select create, set the name to the same - ensure the restrict access to administrators only is not selected.. and it adds the share.. but you can still manage permissions perfectly yourself.

gtb
Expert
Posts: 4222
Joined: Thu Oct 06, 2011 1:00 pm
Location: Sunnyvale, CA USA
x 15

Re: Synology SPK for DVR Record Engine

Post by gtb »

demonrik wrote: Mon Jun 11, 2018 4:07 pm Thus I suspect that there is somewhere else that synology is setting up additional permissions outside the + which truly govern what the permissions are for the folder.
I have not really followed the discussion, but the "+" indicates Linux ACLs. You can use getfacl to see them (and setfacl to set them). And FWIW (which is nothing), I have no clue how Synology may be using ACLs, nor any idea if they document their usage(s).

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

gtb wrote: Mon Jun 11, 2018 4:13 pm
demonrik wrote: Mon Jun 11, 2018 4:07 pm Thus I suspect that there is somewhere else that synology is setting up additional permissions outside the + which truly govern what the permissions are for the folder.
I have not really followed the discussion, but the "+" indicates Linux ACLs. You can use getfacl to see them (and setfacl to set them). And FWIW (which is nothing), I have no clue how Synology may be using ACLs, nor any idea if they document their usage(s).
Good info.
I can't find getfacl on the system either, so am guessing they've hidden it in some tool (synoacltool maybe)
just have to keep digging.

To be honest, I find very little docs on most of the synology stuff. Some things I did manage to get from the various docs they've created, but generally they create overwhelming tools that are just too complicated to use, so ended up doing a lot of just reverse engineering things to see what works and what doesn't :(

jasonic8
Posts: 121
Joined: Wed Jul 01, 2015 3:03 am
Location: Somerset, UK

Re: Synology SPK for DVR Record Engine

Post by jasonic8 »

Had a power outage while I was away from home - updated DSM to 6.2 when I got back - now HDHR can't see the DVR service - says it's not configured. Was working fine before. Any thoughts? I'm too exhausted to trawl through this thread to try and see if it's been tackled before - I think my beta days are over.

Jason

jasonl
Silicondust
Posts: 16801
Joined: Sun Oct 28, 2007 9:23 pm
x 56

Re: Synology SPK for DVR Record Engine

Post by jasonl »

What's the device ID for your HDHomeRun?

Does the DVR show on http://my.hdhomerun.com/ ?

jasonic8
Posts: 121
Joined: Wed Jul 01, 2015 3:03 am
Location: Somerset, UK

Re: Synology SPK for DVR Record Engine

Post by jasonic8 »

Model: HDHR4-2DT
Device ID: 12301DB4
Firmware: 20180327

Yes it shows on that page, and now that I've checked that, it's working again.

Is there a delay from the service starting and registering somewhere in the cloud? I tried for 5-10 minutes stopping and starting the service and checking the HDHomeRun Viewer app and it couldn't be found.

Thanks,
Jason

jasonl
Silicondust
Posts: 16801
Joined: Sun Oct 28, 2007 9:23 pm
x 56

Re: Synology SPK for DVR Record Engine

Post by jasonl »

When you first start the DVR, it scans all the recordings to make an inventory of what is available. For someone like you who has around 3000 recordings, that will take a couple minutes. I'm not entirely sure how you ended up with 1600+ recordings of The Big Bang Theory, but that alone took over 45 seconds to scan.

jasonic8
Posts: 121
Joined: Wed Jul 01, 2015 3:03 am
Location: Somerset, UK

Re: Synology SPK for DVR Record Engine

Post by jasonic8 »

Ah that's really good to know - thanks.

The number of duplicate recordings brings me back to a request to not duplicate episodes of a series unless a) there were errors, or b) the new showing is higher resolution (and then replace, not duplicate) Such a simple idea but maybe really hard to implement (I don't see why)?

jasonl
Silicondust
Posts: 16801
Joined: Sun Oct 28, 2007 9:23 pm
x 56

Re: Synology SPK for DVR Record Engine

Post by jasonl »

The DVR should not re-record the same episode unless:
  • The recording is deleted with the option to re-record selected
  • The recording disappears from the DVR (deleted from outside the DVR, removed from the recording location, or modified to remove the recording header)
  • The guide listings have the episode marked as "new"
  • The guide listings have no episode data
The first 2 would be something you're doing on your own and would be able to fix by not doing that :lol:. The latter 2 would be something we might need to submit to our listings provider, and any details of that should be started as a new thread in the Guide Issues forum.

Post Reply