Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

MineOS in Jail and adding a data drive

pappabees

Newbie
Joined
Dec 14, 2020
Messages
3
Hello all,
Ok I have MineOS installed on TrueNAS 12.0-U1.1. Installed it using the plugin and it is running in its own Jail inside iocage just like it should. I can connect to it and everything is running fine. What I can't find is how to do this.
I would like to have the server using a different data drive for it's stuff other than the IOCage. I have mounted another pool share to it but I can't see where inside the MineOS I would tell it to use that drive instead of the default area it is using which has to be in the Jail space which is a smaller SSD drive.

everything is running and my kids can connect just fine and all that so any help in how to connect another drive and point the data from Minecraft to that drive would be appreciated.

Thank you
 

Jurgen Segaert

Senior Member
Joined
Jul 10, 2016
Messages
435
I would like to have the server using a different data drive for it's stuff other than the IOCage.
Keeping your data separate from the application (plugin/jail) is the recommended way to do it.

In case of MineOS, the minecraft server data resides in /var/games/minecraft inside your jail.
You would create a new dataset in your main pool, copy/move your minecraft data to that new dataset, and then mount that new dataset in your jail. I'll be verbose, because I don't know your experience with FreeNAS/TrueNAS or command line stuff, and other readers may look for this same information. Ideally, use a proper ssh client instead of the built-in shell. Copy and paste are your friends! If you already have a working mineos jail, start with step #3. :smile:

Suppose your main data pool is called tank, the pool selected for iocage jail & plugin storage is called ssd, and the plugin is called mineos-jail, then the steps would be as follows:
  1. Install the Mineos plugin called mineos-jail using the GUI.
  2. Use the GUI to add a new dataset called mcdata under tank. Turn off "Atime" for performance and keep the rest of the defaults as is ("Share Type" = Generic). The dataset will be mounted in /mnt/tank/mcdata
  3. Stop the plugin jail.
  4. Copy the minecraft server data from the jail on the ssd-pool to the new dataset mcdata on the tank-pool. Use the command below from the command line. cp -a /mnt/ssd/iocage/jails/mineos-jail/root/var/games/minecraft/ /mnt/tank/mcdata/
  5. Mount the mcdata datset in the jail. You'll have to do this from the command line, as the GUI only lets you mount datasets that are empty. iocage fstab -a mineos-jail "/mnt/tank/mcdata /var/games/minecraft nullfs rw 0 0".
  6. Start the plugin jail back up.
 
Last edited:

pappabees

Newbie
Joined
Dec 14, 2020
Messages
3
thanks so much for replying and for the detail. I will not get a chance to try this until probably next week but I definitely will be trying and I report back. Again thank you.
 
Top