ZFS always pre-pends /mnt to mountpoints inside jail

Status
Not open for further replies.

Vick Khera

Dabbler
Joined
Jul 8, 2015
Messages
17
I'm running FreeNAS 11.1-U4 and I'm using the iocage jails. I used the (new) UI to create the jail. I used the command line to enable and add a ZFS data set to my jail, which has no mountpoint inside it. This is perfect for what I want.

Now, I go to create a new data set and have it be /web on my jail. However, it always gets mapped to /mnt/web instead:

Code:
root@lorax:~ # zfs set mountpoint=/web tank/iocage/jails/lorax/data/web
root@lorax:~ # zfs get mountpoint tank/iocage/jails/lorax/data tank/iocage/jails/lorax/data/web
NAME							  PROPERTY	VALUE	   SOURCE
tank/iocage/jails/lorax/data	  mountpoint  none		local
tank/iocage/jails/lorax/data/web  mountpoint  /mnt/web	local
root@lorax:~ #


If I specify the mountpoint as /mnt/web it prepends another /mnt on it.

I don't see any obvious sysctl settings or know of any other FreeBSD tweaks that would cause this to happen. I've done this with stock FreeBSD systems using the old version of iocage with no problems, too.

Any advice on how to make it map to the desired location will be greatly appreciated.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
In the new UI, go to Jails and select the three dots and select mount points.

upload_2018-4-22_17-39-32.png
 
Joined
Jul 10, 2016
Messages
521
Check the output of the command zpool get altroot tank This is set to /mnt on FreeNAS but is not set on a vanilla FreeBSD installation.

From the manpage of zpool(8)

altroot: Alternate root directory. If set, this directory is prepended to any mount points within the pool.
 
Status
Not open for further replies.
Top