Jump to content

FreeNAS plugin


Luke

Recommended Posts

eraser8

The package is so easy to update/install with "pkg add -f" that I don't see the real need to give effort on the freenas plugin. Just my opinion! 

 

The guy (or girl) who decide to install freenas should "normally" be able to use some command in iocage.... If not, they should learn it or return in windows :)

Edited by eraser8
Link to post
Share on other sites

The guy (or girl) who decide to install freenas should "normally" be able to use some command in iocage.... If not, they should learn it or return in windows :)

 

Ah, GIFT rears its head again.

 

I'll probably end up recreating the iocage plugin, as there isn't much to it, and it does integrate nicely with the FreeNAS UI if it can identify the management interface. That's most of the point of the plugin.

  • Like 1
Link to post
Share on other sites
zandr

For anyone else running FreeNAS who would like to run directly from the FreeBSD Package repository instead of the TrueOS repo, here's a manifest file.
All I've changed is the repo URL and fingerprint, and switched to DHCP for the jail network interface. Nothing in the artifact needed to change, so I've left the manifest pointing at the FreeNAS artifact repo.

{
    "name": "Emby",
    "release": "11.3-RELEASE",
    "artifact": "https://github.com/freenas/iocage-plugin-emby.git",
    "properties": {
        "dhcp": 1
    },
    "pkgs": [
        "emby-server",
        "ffmpeg"
    ],
    "packagesite": "http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest",
    "fingerprints": {
        "iocage-plugins": [
            {
                "function": "sha256",
                "fingerprint": "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"
            }
        ]
    },
    "revision": "0",
    "official": false
}

Install with:

sudo iocage fetch -P emby.json

-Zandr

Edited by zandr
  • Like 1
Link to post
Share on other sites
  • 2 weeks later...
wbravin

I am not sure whom you are replying too. However, I am quite sure i never said you need more understanding of linux in order to get emby running. I might have said that FreeNAS is a storage solution first and a VM solution second, so you need to figure some things out.

 

Back to your problem. When i read problems with "cant see folder" i always think its a permission problem, because thats what my experience tells me.

 

Typically it boils down to that emby is installed with the user UID 989 and GID 989 and the first user of freenas has the UID 1000 with the GID 1000, naturally your first user (if you are not inclined to deal with permissions) creates datasets and creates the movie folders and what not. When you mount these datasets they can not be seen from the emby side.

 

There are two solutions that i can fathom.

1. Change the UID and GID the emby user is running as (easy requires 4 lines copy and paste in the emby shell) 

or.

2. Create a seperate user emby in freenas with UID:GID 989:989 that owns your media datasets.

 

 

 

For 1. open the emby plugin shell and replace 1101 with the userid you want

service emby-server stop
pw groupmod emby -n emby -g 1101
pw usermod emby -n emby -u 1101 -g 1101
chown -R emby:emby /var/db/emby-server
sysrc 'emby_server_user=emby'
service emby-server start

The 2nd. one is more involved with clicking through the GUI, I posted a simple terribly written pdf a day or so ago here https://emby.media/community/index.php?/topic/42569-freenas-emby-setup-guide/page-2&do=findComment&comment=794468

 

Most of these permission problems happen with all the plugins that need access to data, thats just the nature of the jail/freenas system and the option for the user to give each individual tool access to specific data. My personal data security is just terrible, as i am also just a click through the gui user so I have one user with the uid 1101 that does pretty much everything.

hello @@makarai i seem to have issues with the 5th line of your code i tries to wright this in jail shell in freenas 11.3

 

are there quote involved

 

thank you for responding 

Link to post
Share on other sites
makarai

Hi @@wbravin sorry I have not been partaking in the conversation. I am only on the phone right now, did you replace 1101 with the userid that owns your media? I'll will read the thread tomorrow and see if I can help

Link to post
Share on other sites
wbravin

thank you for your reply

 

yes i did

 

By deleting the media and copy it back from my redundant server seamed to have resolved the problem. now i have a permission issue in my windows explorer. this will be my dilemma for tomorrow

 

thank you

Link to post
Share on other sites
makarai

thank you for your reply

 

yes i did

 

By deleting the media and copy it back from my redundant server seamed to have resolved the problem. now i have a permission issue in my windows explorer. this will be my dilemma for tomorrow

 

thank you

 

 

Well, to be honest from your last reply you are having permission issues. The problem i see here is that you direct mount in freenas and use the standard freebsd permission scheme, when you share that same dataset to windows utilizing SMB typically the permissions will be changed.  Long time ago i tried to deal with having two permission schemes in parallel, it never worked for me. So my solution is not mounting in windows and just installing a sftp program. 

Link to post
Share on other sites
wbravin

thank you for your reply

 

what is an sftp program

 

would this add an additional complexity level? I like to keep things simple

 

here is a copy (just for your information ) of a post i did on the freenas forum

 

since the post below i copied and pasted from my redundant server my tv shows and now I see them. However i cannot load these file into the emby library. 

 

 

hello all

i am totally frustrated with permission issues since upgrading to freenas 11.3. everything was working well in 11.2 u8. now the emby plugin did not work so i fix it. I must have screwed something up. what i do not know.

preface;

I have a user UID wbravin with full control who is part of gid wheel, wbravin, emby
i have a user uid emby with full control who is part of gid wheel wbravin emby

my pool datasets are owned by wbravin
my smd shares are owned by wbravin
my windows credentials are set for freenas to wbravin

i see my shares in windows explorer network freenass, media, then my shares music, document, movies and tv shows.

for whatever reason in music documents and movies i can access the share and the sub folder and play the media. as it should be

however for tv shows i can see the tv show share i can see the sub folders but i cannot access the sub solder and play the media.

it tells me that i need permission from freenas\root where do i change this?

all permission for all share look the same

what am i missing?

on a more developed note I would like to know how to eliminate all permissions. I live alone and i am the only one who has access to the solution. hence i would like to access all with out login in.

I tried to follow this thread and looked at the videos before doing this

Link to post
Share on other sites
hjason7812

thank you for your reply

 

what is an sftp program

 

would this add an additional complexity level? I like to keep things simple

 

here is a copy (just for your information ) of a post i did on the freenas forum

 

since the post below i copied and pasted from my redundant server my tv shows and now I see them. However i cannot load these file into the emby library. 

 

 

hello all[/size]i am totally frustrated with permission issues since upgrading to freenas 11.3. everything was working well in 11.2 u8. now the emby plugin did not work so i fix it. I must have screwed something up. what i do not know.[/size]preface;[/size]I have a user UID wbravin with full control who is part of gid wheel, wbravin, emby[/size]i have a user uid emby with full control who is part of gid wheel wbravin emby[/size]my pool datasets are owned by wbravin[/size]my smd shares are owned by wbravin[/size]my windows credentials are set for freenas to wbravin[/size]i see my shares in windows explorer network freenass, media, then my shares music, document, movies and tv shows.[/size]for whatever reason in music documents and movies i can access the share and the sub folder and play the media. as it should be[/size]however for tv shows i can see the tv show share i can see the sub folders but i cannot access the sub solder and play the media.[/size]it tells me that i need permission from freenas\root where do i change this?[/size]all permission for all share look the same[/size]what am i missing?[/size]on a more developed note I would like to know how to eliminate all permissions. I live alone and i am the only one who has access to the solution. hence i would like to access all with out login in.[/size]I tried to follow this thread and looked at the videos before doing this[/size]

 

I had an issue with permissions too.

All i did was go through everything and set all permissiins to nobody. Set everything from your pool, dataset, shares, emby, etc etc to nobody and save everything and restart then you should be ok after. I had to redo the permission every so often but i think it was a bug in freenas haven't had to mess with it the last 3 updates.

 

Good luck

Link to post
Share on other sites
wbravin

Thank you all for your responses

 

so far i deleted the tv shows on my main freenas box (where i had the problem) and copied and paste fro from my freenas2  (my backup server) and when folder to the tv library in emby I pointed it to the mapped drive in my windows machine and its working.

 

It is in the middle of copying all the tv series and it still has 11 hours to go.

 

Once this is complete I will try to change ownership to nobody with full control

 

once again thank you for this 

Link to post
Share on other sites
  • 1 month later...
  • 4 weeks later...
ddywz

Hello there. Was running Emby on my Ubuntu server for a long time and as we all get bored when things do work and would like to cause issues I decided to give FreeNAS a try. 

 

Well to make it short have installed everything ok and the backend looks healthy with the arsenal of plugins for sab, sonarr and radarr all in their jails.  So far so good.  I had to go through a hell with permissions in UNIX and have servers in jail talk to each other and datasets out of jail. but was determined to not switch to CIFS and use NFS only for this purpose.

 

I'm now trying to setup Emby plugin from iXstystems collection. that shows to have emby version 4.4.2.0.

 

Question?  Is it recommended to install from iXsystems or from community? 

 

I tried the plugin from iXsystems and installed fine.  Configured some paths for media but then needed to do too many changes to fit my environment so I decided to delete the plugin and start fresh.  When I try to re-install the plugin I get this:

 

5ed122b8d2f41_Annotation20200529103524.j

 

I believe I had the source unmounted and the service was stopped when I deleted the plugin.   It appears like is still remembering from the first install that the path to dataset is unmounted.  Is there a fix for this?  I don't see any traces of the previous installation in the jail or when I visit iocage,  Rebooted everything but did not help.

 

I'm running

OS Version:

FreeNAS-11.3-U3.1

 

 

Anyone has seen this?

Link to post
Share on other sites
MRobi

install from community.

Instead of deleting the plugin and re-installing, destroy the jail and start from scratch.

All you should have to do is install the plugin (which creates the jail), mount your storage and set permissions. And I see you're on 11.3 so permissions are now real simple.

Check out this guide, you can apply it to all your plugins:

https://emby.media/community/index.php?/topic/85123-setting-permissions-in-freenas-113/

Link to post
Share on other sites
ddywz

install from community.

Instead of deleting the plugin and re-installing, destroy the jail and start from scratch.

 

Thanks for the reply Mrobi..   Are you saying to destory all Jails and detete the dataset for iocage?   I have 4 other Jails with other stuff that are working great.  I don't see any jail for emby in particular. The only option to remove a plugin is by Deleting it.  Is there another way or removing a plugin and re-installing it back if you wanted?

 

Deleting the whole dataset for iocage for the sake of one plugin does not seem like a solution or fix for me.

Link to post
Share on other sites
MRobi

Thanks for the reply Mrobi..   Are you saying to destory all Jails and detete the dataset for iocage?   I have 4 other Jails with other stuff that are working great.  I don't see any jail for emby in particular. The only option to remove a plugin is by Deleting it.  Is there another way or removing a plugin and re-installing it back if you wanted?

 

Deleting the whole dataset for iocage for the sake of one plugin does not seem like a solution or fix for me.

No, definitely don't destroy them all or the iocage dataset.

 

In FreeNAS when you install a plugin it creates a jail. A jail isolates itself from every other part of the system (hence the name jail). You say it's still remembering settings from your previous install which would mean you likely deleted the plugin and re-installed it in the same jail. Instead, delete the jail (just your emby jail) and then re-install.

 

I personally do it through shell using

iocage destroy JAILNAMEHERE

It can also be done in the GUI. Right below plugins you'll see jails. When you click on that you get a list of all your jails. If you click on the ">" to the right it will expand and you'll see the delete button.

 

Delete any Emby jails you may have created, then go back to plugins and install via the community installer.

Link to post
Share on other sites
ddywz

Mrobi - that is what I did,  I just deleted the jail for emby, (I called it mdserver).  If I go on shell and do iocage list  I see only the jails that I use and there is no trace of emby or mdserver jail that was created from the Emby plugin install.  Yet when I go to install Emby plugin I get that error.  I tried with CLI too.. Here is what I get:

 

5ed4278cca388_Annotation20200531175211.j

Link to post
Share on other sites
MRobi

Mrobi - that is what I did,  I just deleted the jail for emby, (I called it mdserver).  If I go on shell and do iocage list  I see only the jails that I use and there is no trace of emby or mdserver jail that was created from the Emby plugin install.  Yet when I go to install Emby plugin I get that error.  I tried with CLI too.. Here is what I get:

 

5ed4278cca388_Annotation20200531175211.j

Yup, from what I can see there, the emby jail is gone. You should be good for a clean install and there is no possible way for any traces of previous settings to be present.

Link to post
Share on other sites
ddywz

No,  the error is still there. Although the jail for emby is gone the installation of the plugin still fails with that error.  I'm unable to re-install the plugin again. 

 

Not sure what to do at this point.

Link to post
Share on other sites
MRobi

No,  the error is still there. Although the jail for emby is gone the installation of the plugin still fails with that error.  I'm unable to re-install the plugin again. 

 

Not sure what to do at this point.

Are you able to SSH/SFTP into your FreeNAS server, browse to your iocage directory and see if there's a leftover directory in there? Usually it's stored in YOURDATASET/iocage/jails I use winscp or putty for this. It could be causing a conflict while trying to install. 

 

If that doesn't work we can probably walk you through a manual install instead of the plugins section

Link to post
Share on other sites
roshynet

hola, que tal, sou nuevo en el uso de Emby me agrada mucho, pero me tope con un problema, o quiza algo estoy haciendo mal, tengo emby en un plugin de freenas, funciona perfecto con las peliculas y videos, pero cuando coloco imagenes o fotografias en alguna de las carpetas, la imagenes no se muestran, aun dando clic en fotos, ojala y me pudieran ayudar.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...