Synology package thread



Nope this was with Beta2, but it seems that the latest DSM added some folders owned by root into my music directory that was tripping it up. Either that, or something else added those directories and the upgrade/reboot was just a red herring and the issue was waiting to rear it's head some other time. Nothing I couldn't handle though, and the latest PMS upgraded and restarted with no problems (though I removed the space from my share name so can't confirm that one).

Ok, first problem I see is that people judge before trying ;)
Yes, rar2fs consumes some memory, but still memory footprint is kept at a minimum. The thing that actually requires some memory worth mentioning is when you start to extract compressed archives on the fly. This since it needs some sort of buffer to deal with laggy networks and playback history. Even then, CPU wise it is hardly noticeable, unless you jump in the stream! Jumping requires some catch-up and thus CPU load will increase, but only for a short moment. rar2fs have been tried successfully on small embedded systems with only a 128MB RAM and 300-400Mhz CPU. It was even possible on such systems to playback compressed RAR archives including 1080p media also using file system encryption at the same time :-o rar2fs was designed for less capable devices and I hardly doubt that you would notice a performance decrease.
However, I know zip about the Synology platform so I can not tell if rar2fs is an option for you or not. But my guess is that it should work just fine provided you can install user applications on it and that it supports FUSE.

-H

Edit: And oh, after looking at some specs., is this NAS solution running Windows ?? Then it is a bummer :( Unless you take the slow path and apply the workaround of installing a minimial Linux host in VMware or VirtualBox. But then things really start to get hairy :) But if you are running Linux or OSX on the client side then I see no problem in using rar2fs.

And that's the real issue. :D

It's a Linux, but I never saw something as bare-bones and as broken as the Synology's Linux.
Adding even one package is a mess: http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc
And of course, it's not supporting FUSE (after a quick Google search). Heck, it doesn't have "less".

Also, I didn't know rar2fs was so small. Guess I really should not make assumptions.
But I only mentioned it after "it could be done I guess, but not sure of the payoff given the difficulties to have it on the NAS", which is the main, not avoidable, issue.

Hi there!



I’m having an issue with the newest version for Synology devices… It’s scanning all the shows now with the fix, but some shows like Family Guy, Doctor Who, and Battlestar Galactica (to name a few) aren’t getting all the metadata. Family Guy has some episode names listed, but no poster art or anything and I can’t manually select it as none show up.



This is a fresh install, and I’ve taken the following from the scanner log (there’s lots more of similar errors):


Dec 07, 2011 19:10:47 [0x4000] DEBUG - Refreshing GUID: 'local://33'                                                                                                                                                                                                                        <br />
Dec 07, 2011 19:12:18 [0x4000] ERROR - Error issuing curl_easy_perform(handle): 28                                                                                                                                                                                                          <br />
Dec 07, 2011 19:12:18 [0x4000] WARN - Error issuing request to: http://127.0.0.1:32400/system/agents/update?mediaType=2&force=1&guid=local:%2F%2F33&id=33 (28, Timeout was reached) (Operation too slow. Less than 1 bytes/sec transferred the last 90 seconds)                             <br />
Dec 07, 2011 19:12:18 [0x4000] ERROR - Error parsing content.                                                                                                                                                                                                                               <br />
Dec 07, 2011 19:12:18 [0x4000] ERROR - Error parsing XML response for update.                                                                                                                                                                                                               <br />
Dec 07, 2011 19:12:19 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateFinish?metadataItemID=33                                                                                                                                                             <br />
Dec 07, 2011 19:12:19 [0x4000] DEBUG - Matching 'Stargate Atlantis' (ID 6123) with agent com.plexapp.agents.thetvdb                                                                                                                                                                         <br />
Dec 07, 2011 19:12:19 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateMatching?metadataItemID=6123                                                                                                                                                         <br />
Dec 07, 2011 19:12:19 [0x4000] DEBUG - Most recent grandchild was episode 20                                                                                                                                                                                                                <br />
Dec 07, 2011 19:12:19 [0x4000] DEBUG - Issuing search query: http://127.0.0.1:32400/system/agents/search?mediaType=2&id=6123&identifier=com.plexapp.agents.thetvdb&duration=2535000&filename=%252Fvolume1%252Fshared%252FTV%2520Shows%252FStargate%2520Atlantis%252FS05E20%2520-%2520Enemy%2<br />
Dec 07, 2011 19:15:44 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/system/agents/search?mediaType=2&id=6123&identifier=com.plexapp.agents.thetvdb&duration=2535000&filename=%252Fvolume1%252Fshared%252FTV%2520Shows%252FStargate%2520Atlantis%252FS05E20%2520-%2520Enemy%2520at<br />
Dec 07, 2011 19:15:44 [0x4000] ERROR - Error parsing content.                                                                                                                                                                                                                               <br />
Dec 07, 2011 19:15:44 [0x4000] ERROR - Exception caught while attempting to match metadata on item 6123: Error parsing file                                                                                                                                                                 <br />
Dec 07, 2011 19:15:44 [0x4000] ERROR - XML was (0 bytes):                                                                                                                                                                                                                                   <br />
Dec 07, 2011 19:15:44 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateFinish?metadataItemID=6123                                                                                                                                                           <br />
Dec 07, 2011 19:15:45 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateStart?metadataItemID=6123                                                                                                                                                            <br />
Dec 07, 2011 19:15:45 [0x4000] DEBUG - Refreshing metadata for 'Stargate Atlantis' (agent: com.plexapp.agents.thetvdb)                                                                                                                                                                      <br />
Dec 07, 2011 19:15:45 [0x4000] DEBUG - Refreshing GUID: 'local://6123'                                                                                                                                                                                                                      <br />
Dec 07, 2011 19:17:16 [0x4000] ERROR - Error issuing curl_easy_perform(handle): 28                                                                                                                                                                                                          <br />
Dec 07, 2011 19:17:16 [0x4000] WARN - Error issuing request to: http://127.0.0.1:32400/system/agents/update?mediaType=2&force=1&guid=local:%2F%2F6123&id=6123 (28, Timeout was reached) (Operation too slow. Less than 1 bytes/sec transferred the last 90 seconds)                         <br />
Dec 07, 2011 19:17:16 [0x4000] ERROR - Error parsing content.                                                                                                                                                                                                                               <br />
Dec 07, 2011 19:17:16 [0x4000] ERROR - Error parsing XML response for update.                                                                                                                                                                                                               <br />
Dec 07, 2011 19:17:16 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateFinish?metadataItemID=6123                                                                                                                                                           <br />
Dec 07, 2011 19:17:16 [0x4000] DEBUG - Matching 'Stargate Sg1' (ID 5146) with agent com.plexapp.agents.thetvdb                                                                                                                                                                              <br />
Dec 07, 2011 19:17:17 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateMatching?metadataItemID=5146                                                                                                                                                         <br />
Dec 07, 2011 19:17:17 [0x4000] DEBUG - Most recent grandchild was episode 20                                                                                                                                                                                                                <br />
Dec 07, 2011 19:17:17 [0x4000] DEBUG - Issuing search query: http://127.0.0.1:32400/system/agents/search?mediaType=2&id=5146&identifier=com.plexapp.agents.thetvdb&duration=2501000&filename=%252Fvolume1%252Fshared%252FTV%2520Shows%252FStargate%2520SG1%252FS10E20%2520-%2520Unending%252<br />
Dec 07, 2011 19:20:50 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/system/agents/search?mediaType=2&id=5146&identifier=com.plexapp.agents.thetvdb&duration=2501000&filename=%252Fvolume1%252Fshared%252FTV%2520Shows%252FStargate%2520SG1%252FS10E20%2520-%2520Unending%2520(1)%<br />
Dec 07, 2011 19:20:50 [0x4000] ERROR - Error parsing content.                                                                                                                                                                                                                               <br />
Dec 07, 2011 19:20:50 [0x4000] ERROR - Exception caught while attempting to match metadata on item 5146: Error parsing file                                                                                                                                                                 <br />
Dec 07, 2011 19:20:50 [0x4000] ERROR - XML was (0 bytes):                                                                                                                                                                                                                                   <br />
Dec 07, 2011 19:20:50 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateFinish?metadataItemID=5146                                                                                                                                                           <br />
Dec 07, 2011 19:20:51 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateStart?metadataItemID=5146                                                                                                                                                            <br />
Dec 07, 2011 19:20:51 [0x4000] DEBUG - Refreshing metadata for 'Stargate Sg1' (agent: com.plexapp.agents.thetvdb)                                                                                                                                                                           <br />
Dec 07, 2011 19:20:51 [0x4000] DEBUG - Refreshing GUID: 'local://5146'                                                                                                                                                                                                                      <br />
Dec 07, 2011 19:22:22 [0x4000] ERROR - Error issuing curl_easy_perform(handle): 28                                                                                                                                                                                                          <br />
Dec 07, 2011 19:22:22 [0x4000] WARN - Error issuing request to: http://127.0.0.1:32400/system/agents/update?mediaType=2&force=1&guid=local:%2F%2F5146&id=5146 (28, Timeout was reached) (Operation too slow. Less than 1 bytes/sec transferred the last 90 seconds)                         <br />
Dec 07, 2011 19:22:22 [0x4000] ERROR - Error parsing content.                                                                                                                                                                                                                               <br />
Dec 07, 2011 19:22:22 [0x4000] ERROR - Error parsing XML response for update.                                                                                                                                                                                                               <br />
Dec 07, 2011 19:22:22 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateFinish?metadataItemID=5146                                                                                                                                                           <br />
Dec 07, 2011 19:22:22 [0x4000] DEBUG - Matching 'Stargate Universe' (ID 3288) with agent com.plexapp.agents.thetvdb                                                                                                                                                                         <br />
Dec 07, 2011 19:22:22 [0x4000] DEBUG - HTTP request to: http://127.0.0.1:32400/:/metadata/notify/updateMatching?metadataItemID=3288                                                                                                                                                         <br />
Dec 07, 2011 19:22:22 [0x4000] DEBUG - Most recent grandchild was episode 20                                                                                                                                                                                                                <br />
Dec 07, 2011 19:22:22 [0x4000] DEBUG - Issuing search query: http://127.0.0.1:32400/system/agents/search?mediaType=2&id=3288&identifier=com.plexapp.agents.thetvdb&duration=2541000&filename=%252Fvolume1%252Fshared%252FTV%2520Shows%252FStargate%2520Universe%252FS02E20%2520-%2520Gauntle<br />
- /volume1/Plex/Library/Logs/Plex Media Scanner.log [Readonly] 14074/14074 100%<br />




I'm doing a force refresh now, but these are the results I'm getting and it doesn't appear to be grabbing any data for some shows. I'll see what the final result is this time through, but my collection is fairly large so it takes a while and I thought I'd check if it's a known issue. Any ideas on what's going on?

Thanks!

Yea, true. If it is a real hazzle to have FUSE installed on the NAS then it will require both some Linux skills and the possibility to build/install kernel modules and libraries manually.
But are you sure FUSE is not part of the kernel already? Check /proc/filesystems, is it not in there?
But how about the client side? If the client is Linux or OSX, rar2fs might as well be run on that end. It does not have to be installed on the server.

-H

tomo87: sometimes, when I rescan the whole library for testing, it seems to “fail” mid-way.

I usually restart the package in the Package Manager, and match manually the missing shows. Dunno if it’s the workload of the initial scan.

That’s more an Elan issue; you can ask him in a separate thread.



I'm away from my machine right now (I should really set up port forwarding), but I'm 100% sure FUSE is missing.
When I said "barebones", I meant it; I have to get rsync from another folder, and do hacks in the install because basic commands are missing.
So, FUSE? I'd guess it's right out. And the Synology forum has a few threads on "how I can get FUSE?!" without any responses, so no tutorial for installing either.

As for client side, that's not how Plex works: the Server (on the NAS) checks for unRARed video files (.mkv, .mp4, .avi, etc), collects metadata (both from the file and Websites) and sends them to the client when requested.
The client only accepts those video files, and plays them with ffmpeg.
I guess you could install rar2fs on the client machine, install the server on it and use rar2fs on the machine, but then the package we're speaking of in this thread becomes totally useless. :D

Yupp, I came to that conclusion too, just soon after I posted :P
I think I will actually scan my neighborhood for a Synology box :) If you have access to the kernel source they use, cross-compiling a kernel module and the required library is rather easy. The core here is that the _exact_ kernel source (with possible patches and configuration) must be available for download somewhere. If that is not the case, then it is a no-go :(

-H

Edit: I guess this is it. Complete with toolchain and everyting :)
[http://sourceforge.net/projects/dsgpl/](http://sourceforge.net/projects/dsgpl/)
And of course depends on what architecture your NAS is based on, this is for the x86_64 based model(s).

Edit 2: Hmpff. Well, almost complete. It does not include the kernel source :(

I’m having trouble with the scanning that happened for one of my shows after updating to the latest version. The one show is Shaun the Sheep and all the files are in the correct location. A file name for season 1 looks like this “Shaun.The.Sheep.S01E35.Troublesome.Tractor.DVDRip.XviD-aAF.avi”

I can manually open all the episodes with no problem but through Plex I only see 20 episodes of 40 in my Season 1 folder. On some of the episodes listed in Plex I get a box that pops up that tells me to select a file and it’ll list two resolutions. When I play either selection I’ll be taken to a different episode. Only one will match the episode name in Plex. I’ve told Plex to rescan and attempted to edit the meta data but I can’t pull apart the two episodes that are grouped together.


Sounds like the stacking I was talking about earlier.
Strange, I was sure it was fixed in the latest version 0.9.5.2. I didn't get it since then.

Are you sure you're not in 0.9.5.1? That's the version with the stacking bug.

Well, I successfully compiled libfuse, libunrar and rar2fs using the toolchain I linked to earlier for the x86-64 based platforms.

<br />
rar2fs: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.18, not stripped<br />



So, all that remains now is to get hold of the kernel sources (2.4.18 as it seems) and build the FUSE kernel module. Then it should be ready to go.

-H

I'm running the client on Windows 7.

Often when trying to connect with the synology plex server from an LG tv it times out. After restarting the server this problem goes away.



Plex clients on Mac and android donot have this problem.



The Package Center in Synology says 0.9.5.2-641fa29.


Have you tried contacting Synology support with this request? If you can get past the Level 1 drones and push for it to be escalated to the dev team you might be able to tackle it from the other side and get them to update the kernel from there end.... I'm only guessing here but if the kernel contains IP they aren't willing to share I doubt it's going to be had publicly online.

Synology seems to willingly adhere to GPL, at least the kernel for DS101 was open to the public.
And besides, you do not really need the complete kernel source code (in the event they do have something to hide), just the headers and the .config.
I could try a plain vanilla 2.4.18 kernel, but then I need someone to test load it since I do not have a DS-box myself :(
What is the output from 'uname -a' from a x86_64 based box? Someone that can provide this information?

-H


I'll give it a shot tonight when I get home from work. I've got the DS1511+

Ok, I'll check with the devs. Maybe some bug is remaining, I don't know.
Or you can add a comment in [this thread](http://forums.plexapp.com/index.php/topic/32669-episodes-are-stacking/) with the infos you gave; I'm sure Elan will notice it.


Not sure about that, I don't have a LG thing to test.
Is it working/not working with another server as well? Just ot be sure it's a server issue and not a client issue.

Okay I’ve ran the command and this is the output I got plus the version of busybox came up after logging in from a windows box via telnet.



BusyBox v1.16.1 (2011-10-24 18:58:49 CST) built-in shell (ash)

Enter ‘help’ for a list of built-in commands.



NAS> uname -a

Linux NAS 2.6.32.12 #1944 SMP Mon Oct 24 18:52:22 CST 2011 x86_64 GNU/Linux syno

logy_x86_1511+

NAS>


Ok. A 2.6 version of the kernel is more more to expect from a device like this.
But, glibc found in the toolchain seems to be configured for a 2.4 kernel :( I do not know if that really matters, it might.
Also, this does not look like a plain vanilla kernel, it is at patch level 12 which might be Synology patches.
We can make an attempt with a vanilla kernel but I would not hold my breath that it works.

-H

Edit: I found the Synology kernel sources. Or actually I found all of the variants of it together with all GPL software used by SD, from airprint to zlib. Not strange its a mess :) But I am impressed :P
There are so many different branches and for each DSM there is a dedicated toolchain. In this case I used the x64 bromolow toolchain with gcc 4.20, there is also a later one for gcc 4.21, 32-bit. I assume that the DS1511+ is using the latest DSM version which is 3.2. Correct me if I am wrong.

Edit 2: The package contains configurations for several different targets

<br />
/source/linux-2.6.32/synoconfigs$ ls<br />
7820  88f6180  88f6281  88f6281_opensource  bromolow  cedarview  ppc8533  ppc854x  x86  x86_64<br />



Question is, which to choose for the 1511? My guess is bromolow or x86_64, but one of the major differences seems to be the number of supported CPUs/cores, bromolow supports 8, x86_64 supports 4!?
I can see from the kernel source that fuse is configured to build as a module. Has anyone checked in /lib/modules if it is already present under fs?

Edit 3: Here is a fuse kernel module built using bromolow x32_64 toolchain and 2.6.32 kernel.
Feel free to try it out. Just do 'insmod fuse.ko'. If it can be inserted without errors and fuse appear in the list of filesystems in /proc/filesystems then all is ok.
[http://www.mediafire.com/file/xq2ubjtda3bl1l8/fuse.ko](http://www.mediafire.com/file/xq2ubjtda3bl1l8/fuse.ko)

Edit 4: This might have been all for nothing :(
According to what I could read on the Synology forum, the DS1511+ with DSM 3.1 already has support for fuse. Imagine that.
At least that was the conclusion from someone checking /proc/filesystems. If that information is correct, then the DS1511+ is already prepared for running FUSE based file systems. But there is probably others that do not have it.
I think I have polluted this thread enough now! If someone is really interested in having RAR support natively on their Synology SDM, we should do it outside this forum. Also, it should probably be packaged in a .spk container and I have no clue on how to create those.

Okay, first off: congrats on the investigation! That's a long one. :)

For the .spk, it's actually pretty simple compared to the rest: the .spk is in fact a .tgz with another extension.
You can check out the structure of the Plex one by untaring it. The folders/files are explained here: http://forum.synology.com/wiki/index.php/Synology_package_files
Basically, some info files, and a "scripts" folder containing scripts to install/uninstall/upgrade/run the package. You are root for those scripts, so anything can be added anywhere (warning though: anything in /usr/ will be removed after a DSM upgrade).
Also, someone elsewhere linked to Zebulon's spksrc solution. The Zebulon packages were my basis for the Plex package. They can be found here: http://synoblog.superzebulon.org/

And of course, if you have any more SPK questions, you can ask me by PM. Not sure of the delays though, real work gets in the way these last days.

PS: 1511+ is an Atom (x64), not a Bromolow. Only high-ends are Bromolow.