[HowTo] FreeNAS 11.1 + RancherOS + Docker + RancherUI + PLEX

Nebula

Cadet
Joined
Jun 23, 2018
Messages
1
I have been trying for a few hours now to get this setup, however I just am not having any luck.
I've followed your guide along with this guide to use both unix and windows permissions for the share.
https://forums.freenas.org/index.ph...-configure-share-permissions-freenas-9.35276/
I have created a user in freenas called "Downloaders" UID = 1005
Created a volume "Media" with sub folders, tv-shows, Movies, Music
7994ed9734.png

Created a volume "Shared", with only a sub test folder that I created in windows.
f59d21f1da.png

Created and smb share for both Media and Shared
dce3a57cc2.png


Created the mount.yml file
Code:
mounts:
- - //172.30.1.5/Media
  - /media/media	
  - cifs
  - username=Downloaders,password=removed,iocharset=utf8,_netdev
- - //172.30.1.5/Shared
  - /media/shared
  - cifs
  - username=Downloaders,password=removed,iocharset=utf8,_netdev


But ultimately, the mount does not mount.
The folders get created in rancherOS under /media, but there is nothing inside them.
If I attempt to create a folder, I do get permission denied, however the permissions are there as I can see in windows.
bfbb860217.png


I'm not sure where the log file for mounts is located in rancherOS to dig a bit deeper.
Running "df -h" the mounts never mount.
d4a252a9c6.png

This rancherOS vm is not running on freenas, but on my esxi host.
The VM has full accessibility to the freenas server
d3b56eba30.png


Any help is appreciated,

Thanks
 
Joined
Jun 25, 2018
Messages
4
Yes, 1 time and i just restarted RancherOS again and it showed up

It does show up sometimes, sometimes it does not even after multiple restarts. I just updated to FreeNAS-11.1-U6 and it does not show up anymore.
When I look at cat /var/log/syslog I can see this error:
Code:
Aug 22 18:29:16 rancher kernel: [   28.031600] CIFS VFS: Error connecting to socket. Aborting operation.
Aug 22 18:29:16 rancher kernel: [   28.031667] CIFS VFS: cifs_mount failed w/return code = -115
 

Audi.RS4

Cadet
Joined
Apr 8, 2018
Messages
5
Hi,

Anyone else having issues since the latest FreeNAS updates? After the update last month, my Samba share on RancherOS didn't mount. I updated the configuration, adding a "vers=2.1", to the options, and then it was mounting again, but now I notice that it does not have write access. The user provided definitely has write access, as I connect to it from my laptop and can upload items as that user.

Any ideas as to what is wrong with the mount and why it has no write permissions?

Thanks.
 
Joined
Jun 25, 2018
Messages
4
Hi,

Anyone else having issues since the latest FreeNAS updates? After the update last month, my Samba share on RancherOS didn't mount. I updated the configuration, adding a "vers=2.1", to the options, and then it was mounting again, but now I notice that it does not have write access. The user provided definitely has write access, as I connect to it from my laptop and can upload items as that user.

Any ideas as to what is wrong with the mount and why it has no write permissions?

Thanks.

I could not connect at all after updating to U6. I want able to resolve it, so I downgraded to U5. And it works again.
 

Audi.RS4

Cadet
Joined
Apr 8, 2018
Messages
5
I could not connect at all after updating to U6. I want able to resolve it, so I downgraded to U5. And it works again.

I might have to revert to U5 as well. How does one do that? I don't recall seeing it on the upgrade page as an option. I am on the 11.2 Stable train.

Thanks.
 
Joined
Jun 25, 2018
Messages
4
I might have to revert to U5 as well. How does one do that? I don't recall seeing it on the upgrade page as an option. I am on the 11.2 Stable train.

Thanks.

It's under System -> Boot. There you should see different boot options. Select 11.1-U5 then click Activate.
 

Audi.RS4

Cadet
Joined
Apr 8, 2018
Messages
5
It's under System -> Boot. There you should see different boot options. Select 11.1-U5 then click Activate.
Thanks. I reverted, but still do not have write access. I also recently updated my Plex container. I think that might have also changed something, or my attempts to fix it have broken something else.

In RancherOS, I can create content in the mount when I do a sudo run command. The files all show as owned by root. In the Plex container, the files are also owned by root, and the Plex user has not write access, but root does in the container. Looks like I need to get the Plex user in the container to have access to those files.

Thanks.
 

Audi.RS4

Cadet
Joined
Apr 8, 2018
Messages
5
Thanks. I reverted, but still do not have write access. I also recently updated my Plex container. I think that might have also changed something, or my attempts to fix it have broken something else.

In RancherOS, I can create content in the mount when I do a sudo run command. The files all show as owned by root. In the Plex container, the files are also owned by root, and the Plex user has not write access, but root does in the container. Looks like I need to get the Plex user in the container to have access to those files.

Thanks.
Thanks for the help. I found I had to add to the CIFS config, to mount as uid=1001, and gid=1001. Then I created a new Plex container, adding environment variables to set the Ples UID and GID to 1001. Once I did this, Plex was able to write again to the share.
 

Spencer Skinner

Contributor
Joined
Dec 22, 2016
Messages
179
Thanks for the help. I found I had to add to the CIFS config, to mount as uid=1001, and gid=1001. Then I created a new Plex container, adding environment variables to set the Ples UID and GID to 1001. Once I did this, Plex was able to write again to the share.
How did you lay out the config?

Code:
mounts:
- - //192.168.2.10/AlphaData_GlobalShare
  - /media/AlphaData
  - cifs
  - vers=2.1
  - username=spencer,password=xxxx,iocharset=utf8,_netdev
- - //192.168.2.10/AlphaMedia_GlobalShare
  - /media/AlphaMedia
  - cifs
  - vers=2.1
  - username=spencer,password=xxxx,iocharset=utf8,_netdev
- - //192.168.2.10/VMRoot_GlobalShare
  - /media/VMRoot
  - cifs
  - vers=2.1
  - username=spencer,password=xxxx,iocharset=utf8,_netdev

How did you add the UID and GID into the file
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Sorry to ask this in a 6 page thread, but what is the *definitive way* to mount my data back from the RancherOS VM?
I believe both NFS and CIFS are viable?
(https://forums.freenas.org/index.ph...i-ombi-deluge-w-openvpn-pia-sickrage-more.91/ <- that guide uses CIFS)

I want to play with docker a little, I've got RancherOS 1.40 up and running with Portainer and one container just for testing. Surprisingly all of this was quite easy under FreeNAS 11.2 Beta 3 - really slowly getting there.
That mapping back to the main data is the tricky part, so I'd like to do it right.
 

Spencer Skinner

Contributor
Joined
Dec 22, 2016
Messages
179
Sorry to ask this in a 6 page thread, but what is the *definitive way* to mount my data back from the RancherOS VM?
I believe both NFS and CIFS are viable?
(https://forums.freenas.org/index.ph...i-ombi-deluge-w-openvpn-pia-sickrage-more.91/ <- that guide uses CIFS)

I want to play with docker a little, I've got RancherOS 1.40 up and running with Portainer and one container just for testing. Surprisingly all of this was quite easy under FreeNAS 11.2 Beta 3 - really slowly getting there.
That mapping back to the main data is the tricky part, so I'd like to do it right.

Best way to mount over CIFS is to make a file called mount.yaml and then put the following contents inside it
Code:
mounts:
- - //192.168.2.10/AlphaData_GlobalShare
  - /media/AlphaData
  - cifs
  - username=xxx,password=xxx,iocharset=utf8,vers=3.0,uid=xxx,gid=xxx,_netdev
- - //192.168.2.10/AlphaMedia_GlobalShare
  - /media/AlphaMedia
  - cifs
  - username=xxx,password=xxx,iocharset=utf8,vers=3.0,uid=xxx,gid=xxx,_netdev
- - //192.168.2.10/VMRoot_GlobalShare
  - /media/VMRoot
  - cifs
  - username=xxx,password=xxx,iocharset=utf8,vers=3.0,uid=xxx,gid=xxx,_netdev

Replace the top line with your server ip and share, and then the second line with where you want it to mount to. Change the user and password to what user you want it to mount as, same goes for the uid and gid.

Once youve made this file you can merge it with the config by using the command sudo ros config merge -i mount.yaml, the just restart RancherOS and go from there. You can find the config at /var/lib/rancher/conf/cloud-config.yml if you want to edit your mounts.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Thanks, that's the data which was included in the guide I saw. I'll have a play with it.

I would assume if the RancherOS VM is ever replaced, that data is then lost?
https://redmine.ixsystems.com/issues/50236


I'm trying to nudge the developers to find a long term solution to RancherOS updates, I believe (?) many people are frustrated that the update process of the VM is quite destructive for all the stuff.

So that YAML file will need to be considered (if they actually find a long term solution to migrating from old to a new VM or upgrading the existing VM)

Thanks again for reply, I'll have a fiddle with CIFS patching back to my data.
 

Spencer Skinner

Contributor
Joined
Dec 22, 2016
Messages
179
Thanks, that's the data which was included in the guide I saw. I'll have a play with it.

I would assume if the RancherOS VM is ever replaced, that data is then lost?
https://redmine.ixsystems.com/issues/50236


I'm trying to nudge the developers to find a long term solution to RancherOS updates, I believe (?) many people are frustrated that the update process of the VM is quite destructive for all the stuff.

So that YAML file will need to be considered (if they actually find a long term solution to migrating from old to a new VM or upgrading the existing VM)

Thanks again for reply, I'll have a fiddle with CIFS patching back to my data.
Honestly not 100% sure about the viability of RancherOS in its current config for long term solutions, when they introduce proper support for the linux kernel in the 11.2 update id recommend just running an Ubuntu Server VM with docker installed on it, then just make a RancherOS container and Portainer container to manager your stuff. Way more stable and better for the long term tbh
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Honestly not 100% sure about the viability of RancherOS in its current config for long term solutions, when they introduce proper support for the linux kernel in the 11.2 update id recommend just running an Ubuntu Server VM with docker installed on it, then just make a RancherOS container and Portainer container to manager your stuff. Way more stable and better for the long term tbh

No offense intended, but I keep seeing posts like this, about how terrible rancher is but nothing actually outlined?


I'm not aware of any official Linux support in 11.2? It's always going to be under a VM. Isn't it?
Is there some huge bhyve change planned?

I've got one of the weakest systems on these forums and I fired up a rancheros, installed portainer and just one test plugin. It's behaved fine since?
The only major issue I think exists, is updating the rancher VM itself?

Can you elaborate on the exact issues with rancher?
 

Audi.RS4

Cadet
Joined
Apr 8, 2018
Messages
5
How did you lay out the config?

Code:
mounts:
- - //192.168.2.10/AlphaData_GlobalShare
  - /media/AlphaData
  - cifs
  - vers=2.1
  - username=spencer,password=xxxx,iocharset=utf8,_netdev
- - //192.168.2.10/AlphaMedia_GlobalShare
  - /media/AlphaMedia
  - cifs
  - vers=2.1
  - username=spencer,password=xxxx,iocharset=utf8,_netdev
- - //192.168.2.10/VMRoot_GlobalShare
  - /media/VMRoot
  - cifs
  - vers=2.1
  - username=spencer,password=xxxx,iocharset=utf8,_netdev

How did you add the UID and GID into the file

I was out on vacation and then just busy. It seems you found your answer by the looks of your later response?
 

malignosama

Cadet
Joined
Oct 28, 2018
Messages
6
Hi Yusuf,

Great guide! Exactly what I was looking for. However I am getting stuckt in step 4. CIFS shares do not get mounted after restarting.

I got the mount.yaml merged with the rancher os configuration without issues. Actually my "ros config export" looks like this:

Code:
EXTRA_CMDLINE: /init
mounts:
- - //192.168.1.10/Descargas
  - /media/Descargas
  - cifs
  - username=multimedia,password=PASSWORD,iocharset=utf8,_netdev
- - //192.168.1.10/Anime
  - /media/Anime
  - cifs
  - username=multimedia,password=PASSWORD,iocharset=utf8,_netdev
- - //192.168.1.10/Series
  - /media/Series
  - cifs
  - username=multimedia,password=PASSWORD,iocharset=utf8,_netdev
- - //192.168.1.10/Peliculas
  - /media/Peliculas
  - cifs
  - username=multimedia,password=PASSWORD,iocharset=utf8,_netdev
rancher:
  environment:
	EXTRA_CMDLINE: /init
  network:
	dns:
	  nameservers:
	  - 1.1.1.1
	  - 192.168.1.1
	interfaces:
	  eth0:
		address: 192.168.1.11/16
		dhcp: false
		gateway: 192.168.1.1
		mtu: 1500
	  eth1:
		address: 192.168.1.12/16
		dhcp: false
		gateway: 192.168.1.1
		mtu: 1500
  password: PASSWORD
  resize_device: /dev/sda
  services_include:
	open-vm-tools: true
	volume-cifs: true
  state:
	dev: LABEL=RANCHER_STATE
	wait: true
ssh_authorized_keys: []


Under the /media directory I can see that rancherOS created all the needed directories.

Can it be that rancherOS is not supporting being a CIFS client? Mounting the shares from a different computer works without issues, so it is not a problem on the FreeNAS side.

Do you have any suggestions what could be the issue here?
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Hello!

I'm trying to diagnose some issues I'm having with guacamole and I'm stuck as hell.

SHOULD / CAN/ DOES a RancherOS mount in mount.yaml have WRITE access to a folder?

I've made all these mounts in the mount.yaml but such incredibly weird behaviour
If I SSH into the RancherVM, I can see /media/guacamole/ (which is what I want) AND I can see the contents with ls
If I SSH into the same VM, when I go to /media/mysql/ - also what I want, "ls" is producing 0 files- I KNOW there's files in there.

I root into freeNAS bare system and chown the files, chmod - mess around - nope, RancherOS can NOT see the contents of the mysql mapped path.
Furthermore, I can not "mkdir" anything - no write access.

While I don't know if this is, 100% the cause of my current issues, I'm pretty sure,....... it ain't helping me!
Thoughts? What am I doing wrong?


Code:
mounts:
- - //192.168.0.9/data/backup/dockerconfigs/guacamole
  - /media/guacamole
  - cifs
  - username=USERXX,password=XXPASSXX,iocharset=utf8,_netdev
- - //192.168.0.9/data/backup/dockerconfigs/mysql
  - /media/mysql
  - -cifs
  - username=USERXX,password=XXPASSXX,iocharset=utf8,_netdev



Also!
sudo df -h

"//192.168.0.9/data/backup/dockerconfigs/guacamole
1000.5G 390.5G 610.0G 39% /media/guacamole
"
but I can't SEE the mysql in this list?! - however I can see it when I use the cd /media/mysql command?
 

DD4711

Contributor
Joined
Nov 19, 2018
Messages
102
Hello @ all,

thanks first for this great how-to.

I managed to get everything working expection to connect to plex web GUI. It does not come up.
I had problems with mounting cifs to rancher like other user. I was able to mount the cifs with this string:
Code:
mounts:
- - //192.168.1.201/video
  - /media/video
  - cifs
  - username=plex,password=password,iocharset=utf8,vers=2.1,uid=1000,gid=100,_netdev

1000 is the plex user id and 100 the group users in freenas. This is set in the permissions of the dataset.

In the log of plex container I can read lots of those messages:
Sqlite3: Sleeping for 200ms to retry busy DB.

I am not able to write a file from rancher@rancher ssh, permission denied. The dataset plex is configured in the container as /media/plex:/config . plex user has read write access on it

EDIT: after reboot rancher shares are again not mounted:
Code:
Nov 21 13:12:53 rancher kernel: [   32.802025] CIFS VFS: Error connecting to socket. Aborting operation.
Nov 21 13:12:53 rancher kernel: [   32.803079] CIFS VFS: cifs_mount failed w/return code = -115


I'm out of ideas :(

Did you manage this mount problem?
 
Last edited:
Top