How to Install MiniDLNA on FreeNAS 9.3 (Prior to Plugin)

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Whitin the jail /media is owned by Media group with 774 permissions.
Seems ok for you ?
Should be fine but if you can't solve it with a clean jail install, or just linking a single shared path, try changing the file permissions to 777 and see if that helps. I wouldn't think that would make a difference since you said you had this running before but you just never know.
 

urdel62

Explorer
Joined
Nov 27, 2016
Messages
53
Thanks,

I changed /media permissions to 777, restart the jail and then the scan retrieved all the files.
I don't really get it because the jail user (dlna) is in the Media group (owner of /media), therefore groups permissions should be ok .
Any idea ?
Anyway it's working.
Thanks,
 

urdel62

Explorer
Joined
Nov 27, 2016
Messages
53
Thanks,

I changed /media permissions to 777, restart the jail and then the scan retrieved all the files.
I don't really get it because the jail user (dlna) is in the Media group (owner of /media), therefore groups permissions should be ok .
Any idea ?
Anyway it's working.
Thanks,
Actually it's not that good for me cause changing /media permissions to 777 within the jail changes permissions to my Medias folder to 777 on the freenas and I don't want that. I remember I succeeded on my previous installation without changing /media permissions to 777...
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Actually it's not that good for me cause changing /media permissions to 777 within the jail changes permissions to my Medias folder to 777 on the freenas and I don't want that. I remember I succeeded on my previous installation without changing /media permissions to 777...
You could create a seperate directory with a few videos in it and test things out that way so your entire media library isn't at risk. Gotta think outside the box when you are troubleshooting.
 

urdel62

Explorer
Joined
Nov 27, 2016
Messages
53
You could create a seperate directory with a few videos in it and test things out that way so your entire media library isn't at risk. Gotta think outside the box when you are troubleshooting.
Thanks,
I manage to make it work without setting 777 permissions to Media folder. I post my solution here if someone has the same issue :
My issue was that Media group was an auxiliary group for dlna user instead of being the default group. So by changing it as the default group ,and also add wheel group as an auxiliary group for dlna user (do not know if it is useful), scanning is successful without giving all permissions to my Media folder.
Thanks again joeschmuck for your great help :)
 

BassPlayer

Cadet
Joined
May 28, 2017
Messages
4
It's now October 27, 2017. It's been over two years since there was a post. I just used the guide to install MiniDLNA in FreeNAS-9.3-STABLE-201511040813 (Plex just didn't want to do the job I needed done!). Everything works correctly. Thanks for the guide for the less Linux inclined!)
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
I think the next major update will be when warden is replaced with I think iocage but we have a few months or so before that happens.
 

HAXIS

Dabbler
Joined
Aug 15, 2014
Messages
13
This problem is covered here several times however try something to see if this fixes it and please report back the results...

Add a tunable into "Loader" called "kern.maxfiles" and with a value of "50000". Reboot and see if that fixes it, I hope so and then I can update the first posting to include this data.
Thanks for the quick reply, Joe.

Just before I attempt this, to clarify, you mean a new line in (FreeNAS's, rather than the jail's) /boot/loader.conf with that key/value pair? (Rather a newbie to much of this, apologies.)
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Thanks for the quick reply, Joe.

Just before I attempt this, to clarify, you mean a new line in (FreeNAS's, rather than the jail's) /boot/loader.conf with that key/value pair? (Rather a newbie to much of this, apologies.)
Buggars, I was thinking in the GUI but really it needs to go into the jail. So if you open up an Shell window into the jail and type ee /boot/defaults/loader.conf and then scroll down to line 131 (my version that is) and you should see #kern.maxfiles="". Remove the # at the front and add 50000 between the quotes. Press Escape key and Enter to save the file. Now exit the shell and reboot the jail. I hope this works. Please let me know if thsi fails terribly as I have no time to test it for a few days while I'm burning in my new hard drives.
 

HAXIS

Dabbler
Joined
Aug 15, 2014
Messages
13
Buggars, I was thinking in the GUI but really it needs to go into the jail. So if you open up an Shell window into the jail and type ee /boot/defaults/loader.conf and then scroll down to line 131 (my version that is) and you should see #kern.maxfiles="". Remove the # at the front and add 50000 between the quotes. Press Escape key and Enter to save the file. Now exit the shell and reboot the jail. I hope this works. Please let me know if thsi fails terribly as I have no time to test it for a few days while I'm burning in my new hard drives.
Thanks! (Line 148 in my conf, for the record.)

Will report back tomorrow whether it's still running or has crashed out again, but it's up and running fine so far...
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Please let me know if it works and I will update the instructions if it lasts for a few days. I hope it's the fix you need.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Sadly, it's crashed out again. :(
Sorry to hear it. I'm not sure what else we can do here, FreeBSD/NAS is just not that friendly. I'm not sure if iocage would work any better because it's still built on native FreeBSD. Can you use Plex at all and just use the DLNA server built into it?
 

HAXIS

Dabbler
Joined
Aug 15, 2014
Messages
13
Sorry to hear it. I'm not sure what else we can do here, FreeBSD/NAS is just not that friendly. I'm not sure if iocage would work any better because it's still built on native FreeBSD. Can you use Plex at all and just use the DLNA server built into it?
I started trialling it whilst struggling to get MiniDLNA running, but found it problematic. It seemed to want me to rename all my media to its exacting file naming protocols? I guess I'll have to try it again if MiniDLNA really is a dead end.
 

Bomber

Dabbler
Joined
Sep 18, 2017
Messages
11
Like Haxis, I trialled Plex as the "easy way out" and abandoned it, I couldn't readily find a desired piece of music via my amp due to Plex's insistence on using it's own naming conventions rather than the metadata which I had very carefully modified to be "composer: piece", as many classical albums are conductor-composer (in native or conductor's language)-piece. However, my FreeNAS setup is new and I'm still converting my many hundreds of CDs to FLAC.

Your instructions work perfectly, thanks Joe. (I should know - I've had to do it several times as I couldn't get the jails where I wanted them until I found out I had to remove the SAMBA share).

My question, and I've searched and searched but can't find an answer for FeeNAS 11.x - Is there a way to do a periodic or automatic rescan? I may only do 1 or 2 dics a day and restarting the jail is getting a bit tiresome.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Is there a way to do a periodic or automatic rescan?
I use to have a script that would do that but some users had issues with it and for those reasons it was dropped. But I was under the impression that MiniDLNA would now notice a new file or file change and would automatically rescan based on the time setting (default I think was 900 seconds = 15 minutes) but maybe that still doesn't work under FreeBSD. I don't use MiniDLNA any more but I will continue to support it here while I'm a member of the FreeNAS forums.
 

Bomber

Dabbler
Joined
Sep 18, 2017
Messages
11
But I was under the impression that MiniDLNA would now notice a new file or file change and would automatically rescan based on the time setting (default I think was 900 seconds = 15 minutes) but maybe that still doesn't work under FreeBSD.

It certainly isn't working on my box, I give up after several hours of hoping and restart the jail which then blocks me from accessing it for a while while it does a rescan and a rebuild. Guess I'll just have to stop trying to listen so soon after conversion and restart jail just before bed time each day I add new files.

I don't use MiniDLNA any more but I will continue to support it here while I'm a member of the FreeNAS forums.

What do you use? Plex, something else or not FreeNAS at all as a media server?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
Guess I'll just have to stop trying to listen so soon after conversion and restart jail just before bed time each day I add new files.
Sounds like you have a lot of files. Be aware that many users with a huge amount of files do end up hitting an issue with MiniDLNA where the thing hits a maximum limit to access your files. You can see this riddled through this thread.

What do you use? Plex, something else or not FreeNAS at all as a media server?
Yes, I use Plex precently installed in a FreeNAS jail but I only stream video content. My daughter has iTunes for all of her music to take on the go. I listen to music via my Amazon Echo.
 

Bomber

Dabbler
Joined
Sep 18, 2017
Messages
11
Sounds like you have a lot of files. Be aware that many users with a huge amount of files do end up hitting an issue with MiniDLNA where the thing hits a maximum limit to access your files. You can see this riddled through this thread.

I have a lot of music but at least with classical you get a lot of listening time per file generally :).

I already have two miniDLNA jails running, one for videos and one for music to make it quicker to access the files. If needs be down the track I guess I'll just split the music into multiple "servers". For the moment, thanks for your help.
 
Top