Hello!
I want to use FreeBSD for my home server, I'm not quite familiar with system administration within FreeBSD but I really enjoyed it on my home desktop, so have couple questions to ask. My goal is to understand how the one should utilize jails feature. I started with raw jails(I read about ezjail and few other options, but I want to understand the basics, so expect to fulfill my needs with the raw jails).
1. I want to have the following services: [jail#1]plex media server, [jail#2]transmission-daemon, [jail#3(?)]nfs+smb server AND I want all of them share the same zfs data set(torrent and plex should share the same dataset 100% otherwise it has no use). Is it possible to share single dataset between several jails? From what I read (https://docs.freebsd.org/en/books/handbook/zfs/) it's possible to "jail" dataset to the jail, but only for one at the time. Does it mean that my understanding/use case for jails is incorrect? Will it be the correct way to utilize jails here the following way: [jail#1]plex media server+transmission-daemon+zfs dataset#1; [jail#2] smb+nfs server+zfs dataset#2 ? i remember reading some article comparing linux containers to bsd jails and they said with containers you can share disk space, but with jails - not, so probably that's how it works.
2. Networking inside jails is a tricky one. I created jail(ip4=inherit) for Plex media server and installed/started Plex media server. I use web interface with host ip BUT I can't reach the plex server itself(it says something like: "no server found" on the web interface). [Meanwhile, if I installed plex server on the host - I would be able to reach the plex server(not only it's web interface)] I thought it might be somehow related to the way I set up networking in the jail(ip4=inherit). I tried another way(ip4.addr="192.168.88.10";interface=re0), but the result is the same. If I used virtual machine for this case I would create bridge and get another IP for the guest, but I thought it will be more handy for me to have the same IP for every service. On the other hand: what is the reason to use jails in this case? Probably I should set up "vnet" here? I followed(partially: created jail by myself using the following article: https://rubenerd.com/starting-with-freebsd-jails/) the instructions set for plex set up from here: https://gist.github.com/dreamcat4/f19580cbd31d8f628aca and there are lots of comments in there describing the same problem I have.
Any help is appreciated!
I want to use FreeBSD for my home server, I'm not quite familiar with system administration within FreeBSD but I really enjoyed it on my home desktop, so have couple questions to ask. My goal is to understand how the one should utilize jails feature. I started with raw jails(I read about ezjail and few other options, but I want to understand the basics, so expect to fulfill my needs with the raw jails).
1. I want to have the following services: [jail#1]plex media server, [jail#2]transmission-daemon, [jail#3(?)]nfs+smb server AND I want all of them share the same zfs data set(torrent and plex should share the same dataset 100% otherwise it has no use). Is it possible to share single dataset between several jails? From what I read (https://docs.freebsd.org/en/books/handbook/zfs/) it's possible to "jail" dataset to the jail, but only for one at the time. Does it mean that my understanding/use case for jails is incorrect? Will it be the correct way to utilize jails here the following way: [jail#1]plex media server+transmission-daemon+zfs dataset#1; [jail#2] smb+nfs server+zfs dataset#2 ? i remember reading some article comparing linux containers to bsd jails and they said with containers you can share disk space, but with jails - not, so probably that's how it works.
2. Networking inside jails is a tricky one. I created jail(ip4=inherit) for Plex media server and installed/started Plex media server. I use web interface with host ip BUT I can't reach the plex server itself(it says something like: "no server found" on the web interface). [Meanwhile, if I installed plex server on the host - I would be able to reach the plex server(not only it's web interface)] I thought it might be somehow related to the way I set up networking in the jail(ip4=inherit). I tried another way(ip4.addr="192.168.88.10";interface=re0), but the result is the same. If I used virtual machine for this case I would create bridge and get another IP for the guest, but I thought it will be more handy for me to have the same IP for every service. On the other hand: what is the reason to use jails in this case? Probably I should set up "vnet" here? I followed(partially: created jail by myself using the following article: https://rubenerd.com/starting-with-freebsd-jails/) the instructions set for plex set up from here: https://gist.github.com/dreamcat4/f19580cbd31d8f628aca and there are lots of comments in there describing the same problem I have.
Any help is appreciated!