does the iocage mount point matter?

Status
Not open for further replies.

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
Does the mountpoint of the iocage dataset matter?

For example here is something I noticed while playing with iocage.
  • On a test machine I have clean install of FreeNAS with a zpool called tank. As per the iocage doc's before using iocage it should be activated (basically just telling it which pool to use) The command is simply iocage activate tank among other things this command will create a dataset called iocage inside the zpool tank. The iocage dataset will be mounted at /mnt/iocage
  • On another test (again clean install and zpool called tank) This time I created the iocage dataset before I ran the iocage activate tank command. Now the iocage dataset is mounted at /mnt/tank/iocage
I have tried this using FreeNAS 11.1-U3-5 and 11.2-Beta. Obviously 11.2 Beta has the new GUI for jails/plugins using iocage and still the same result with the new GUI. If the iocage dataset is automatically created it's mounted outside the zpool but if it is manually first created it's mounted inside the zpool. Maybe it's just a minor thing but still I'm curious if it matters what path the dataset is mounted at?

Thanks
 
Last edited:
Joined
Jul 10, 2016
Messages
521
This is by design. If you create a dataset in FreeNAS via the UI or CLI, it will automatically set the mountpoint to /mnt/<parent dataset>/<your dataset>, in your case /mnt/tank/iocage The /mnt prefix comes from the altmount altroot property.

When iocage automatically creates the dataset, it will mount in /mnt/iocage for the first pool you activate and mount in /mnt/<active pool>/iocage for any consecutive pools you activate.

The mountpoint doesn't matter much; iocage will figure it out. The only drawback is that you may have to pay some extra attention with 3rd party tutorials or scripts that might incorrectly assume the mountpoint is always /mnt/iocage, but you shouldn't blindly follow these anyway. ;)

If it gives you heartburn, you can manually change the mountpoint to /mnt/iocage by running zfs set mountpoint="/iocage" tank/iocage.
 
Last edited:
Status
Not open for further replies.
Top