FreeNAS inside jail

Status
Not open for further replies.

nanda

Explorer
Joined
Jun 9, 2013
Messages
56
A stripped down version of FreeNAS running in a jail inside FreeNAS.

Such a configuration would be ideal for a small company or organization, where one could hand out jails to everyone.

Cheers!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
What would the benefit of that be except to train people on how to use FreeNAS? I'm a little confused as to why handing out jails would be superior. Not to mention that FreeNAS needs quite a bit of RAM with ZFS, and you'd have no hardware drives to use inside the jail.
 

nanda

Explorer
Joined
Jun 9, 2013
Messages
56
I'm thinking the disk mounting, partition creation and a few other features would be disabled inside the FreeNAS jail.

No extra memory would be required for ZFS, since the jail would be contained inside a directory of the host.

Handing out FreeNAS jails to people would enable them to run their own ecosystem of jails, with databases, web servers, linux etc.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I don't think you understand how the jail works. It's like using a virtual machine, but the file system is from the host. You couldn't do disk mounting, partition creation, or any of that stuff because you can't pass raw disks to the jail. Only mountpoints can be passed through to the jail(which implies a file system, the disks are mounted and a partition table exists on them).

Even if there wasn't that limitation, the jail's zfsd would still need the RAM for its own zpool. So yes, you would need even more RAM because you'd be running the zfsd on the host as well as the zfsd in the 1(or more) jails. You could quickly find yourself buying 64GB+ of RAM with just a few small jails.
 

nanda

Explorer
Joined
Jun 9, 2013
Messages
56
Maybe I wasn't very clear on how FreeNAS jails would work. When I think of FreeNAS, I think of a web ui controlling an underlying FreeBSD system, but maybe I'm being naive?

Since FreeBSD jails have no real access to hardware, jail web ui's would need to have some features disabled.

Now, I may have misunderstood jails since I'm a BSD newbie, but from what I've read, jails take very little extra memory; ZFS caches, checksums, dedup etc should all be handled by the host controlling the hardware. If this is incorrect, tell me how.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
You are correct in your understanding that the jail takes little extra memory(relatively speaking0. The issue is that if you actually are going to be passing through partition tables and such then the "host" will have nothing to go on regarding caches. ZFS' cache is for zpools, nothing else. Those would be handled by the 'guest'. It's just like a VMWare Workstation or Oracle Virtualbox. The host may cache some of the commonly access files, but since the guest machine is its own OS it also caches its own. That's why you have to give it the same amount of memory as a real physical system. It's also why when you experiement with FreeNAS in a VM you still have to allocate sufficient RAM for it to run. You can't give it 1GB of RAM and expect amazing performance.
 

cheezehead

Dabbler
Joined
Oct 3, 2012
Messages
36
I think the method of the request may be a bit off. Correct me if I'm wrong nanda but you want to say have multiple separate "virtual" NAS for SMB/NFS hosting I'm guessing. For example I have one freenas box but it has multiple instances with separate management planes for the different file servers (note the plural). IE NAS-Prod, NAS-Dev, and NAS-Test may have different administrators and each area could carve up shares and define permissions as they need to but would be bound by whomever is the freenas administrator.

A jail could be one solution for this but it could be also done with enhancements to the primary interface as well.
 

nanda

Explorer
Joined
Jun 9, 2013
Messages
56
I think the method of the request may be a bit off. Correct me if I'm wrong nanda but you want to say have multiple separate "virtual" NAS for SMB/NFS hosting I'm guessing. For example I have one freenas box but it has multiple instances with separate management planes for the different file servers (note the plural). IE NAS-Prod, NAS-Dev, and NAS-Test may have different administrators and each area could carve up shares and define permissions as they need to but would be bound by whomever is the freenas administrator.

A jail could be one solution for this but it could be also done with enhancements to the primary interface as well.

Yes, that is exactly what I want. It does not have to be jails per se, but such a solution would be nice I think.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
You can sort of do that already with the jails.
In my home network, I have 2 CIFS servers that show up on the network browser. One is the actual FreeNAS system, the other one is a jail instance running CIFS for serving a network printer from CUPS.
 
Status
Not open for further replies.
Top