sysutils/iocage in a NAS environment

Allan Jude allanjude at freebsd.org
Fri Jul 31 14:59:10 UTC 2015


On 2015-07-31 10:53, Kai Gallasch wrote:
> 
> 
> On 31.07.2015 16:22 Allan Jude wrote:
>> On 2015-07-31 06:24, Kai Gallasch wrote:
>>>
>>> Hi.
>>>
>>> Just read that FreeNAS 10 is going to use sysutils/iocage for managing
>>> local jails on the NAS. That is great news and it will give iocage more
>>> publicity and a wider user base!
>>>
>>> I am currently testing a FreeNAS 9 as a NAS for my FreeBSD servers. Each
>>> (FreeBSD 10) server is running between 10-50 iocage jails.
>>>
>>> iocage's documentation states that each iocage installation needs a
>>> zpool to run on.
>>>
>>> So the only way I see to use a NAS for iocage deployment would be to
>>> make use of iSCSI (block based) mounts. The NAS would offer an iscsi
>>> target to the jailhost. When mounted, it just shows up as a block based
>>> LUN. You then could create a zpool on this LUN and use this zpool for
>>> iocage. (Each time the jailhost starts up, the iSCSI mount + zpool
>>> import would have to happen automatically)
>>>
>>> Does this approach make any sense when both performance or stability are
>>> needed?
>>>
>>> Is it generally adviseable to use zpools on iSCSI targets, because they
>>> are basically iSCSI exported zvols running on top of another zpool?
>>>
>>> Regards,
>>> Kai.
>>>
>>
>> If FreeBSD 9 is your NAS, why are the disks remote?
>>
>> Normally, you'd run iocage on the NAS (the machine with the physical
>> disks in it) and have direct access to the zpool.
> 
> I understand that this would result in the best performance, but how am
> I to run FreeBSD 10 or 11 jails on this NAS appliance that is plain
> FreeBSD9 ?
> 
> The current state is (as I wrote), that I manage several jail hosts in a
> rack, which are just running jails using the iocage tool.
> 
> What I want to achieve with FreeNAS is to have the jail data centralized
> on the NAS and the jail hosts just "mounting" the jail data and running
> the jails. The benefit would be that if one server dies or needs to be
> completely rebuild, I just remount the jails on another active server,
> without much service interruption.
> 
> In my experience when running a bunch of jail hosts with local jail
> data, much time and effort is wasted moving data around if you want to
> change hardware or have failed hardware, etc.
> 
> K.
> 

Ok, I understand your use case better now.

iSCSI (or geom gate) to share the block device looks to be your only
options if you want to use iocage which depends on ZFS. You could use a
different jail management tool that doesn't depend on ZFS, and then use
NFS or something, but then it is harder to trigger snapshots etc, since
you'd have to do that via the remote NAS.

If this was the only use case for the NAS, you might consider exposing
the raw disks via iSCSI and creating the zpools (and the redundancy)
inside the jail hosts. This would avoid the zpool on iscsi on zvol
complexity. Of course this is harder to conceptualize, especially if you
want to 'pool' storage for maximum utilization.

-- 
Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-jail/attachments/20150731/a06aaac6/attachment.bin>


More information about the freebsd-jail mailing list