Johan
--
You received this message because you are subscribed to the Google Groups "iocage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iocage+un...@googlegroups.com.
To post to this group, send email to ioc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iocage/55E8C1B5.1040608%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Can you give me some example how to mount a zfs dataset within iocage.
Some things are unclear to me!
Also can I mount multiple datasets?
thanks again
regards
Johan
Op 04/09/15 om 01:13 schreef Peter Toth:
Thank you, all looks fine except after a reboot of the host.
The only thing that is not working is after a restart of the whole machine.
The server comes up, the jails are started only the zfs dataset is not mounted. I need to go inside the jail and give it a zfs mount -a, after that the zfs dataset is mounted.
So if the server comes up after a reboot and I go into the jail with iocage console UUID I see the following
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # zfs mount
zroot/iocage/jails/f6d5ba16-5356-11e5-8414-00215aa4de05/root /
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # zfs mount -a
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # zfs mount
zroot/iocage/jails/f6d5ba16-5356-11e5-8414-00215aa4de05/root /
zroot/owncloud-data /usr/local/owncloud-data
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ #
If I stop the jail and start it again, the dataset is mounted, so this is only happening after a full reboot of the host.
One more question !
Do I need to set jailed=on for the zfs dataset ?
Another thing I noticed, but I do not know if it was not there with the 1.7.3 version is that there is no output after the create command.
root@node3:/usr/ports/sysutils/iocage # iocage create tag=owncloud.mytest.domain ipv4_addr="bge0:192.168.1.115"
root@node3:/usr/ports/sysutils/iocage #
I could remember that I saw all the jail properties when I created my first jail.
And I noticed that with the command above I did have a typo in my network settings. I typed ipv4_addr= instead of ip4_addr and I used the : instead of | between the interface and the address. iocage did not tell me the property ipv4 does not excists. also it let me use the wrong syntax. It would have been nice if I got an error message at least for the not valid property.
Here are the steps I did.
root@node3:/usr/ports/sysutils/iocage # zfs create zroot/owncloud-data
root@node3:/usr/ports/sysutils/iocage # zfs set jailed=on zroot/owncloud-data
root@node3:/usr/ports/sysutils/iocage # zfs set compression=lz4 zroot/owncloud-data
root@node3:/usr/ports/sysutils/iocage # iocage create tag=owncloud.mytest.domain ip4_addr="bge0|192.168.1.115"
root@node3:/usr/ports/sysutils/iocage # iocage list
JID UUID BOOT STATE TAG
1 383dc096-51c9-11e5-b0fc-00215aa4de05 on up poudriere.mytest.domain
- f6d5ba16-5356-11e5-8414-00215aa4de05 off down owncloud.mytest.domain
root@node3:/usr/ports/sysutils/iocage # iocage set jail_zfs=on f6
root@node3:/usr/ports/sysutils/iocage # iocage set jail_zfs_dataset=zroot/owncloud-data f6
root@node3:/usr/ports/sysutils/iocage # iocage start f6
* Starting f6d5ba16-5356-11e5-8414-00215aa4de05 (owncloud.mytest.domain)
+ Started (shared IP mode) OK
+ Starting services OK
root@node3:/usr/ports/sysutils/iocage # iocage console f6
FreeBSD 10.2-RELEASE (GENERIC) #0 r286666: Wed Aug 12 15:26:37 UTC 2015
Welcome to FreeBSD!
Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories: https://www.FreeBSD.org/security/
FreeBSD Handbook: https://www.FreeBSD.org/handbook/
FreeBSD FAQ: https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums: https://forums.FreeBSD.org/
Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with: pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.
Show the version of FreeBSD installed: freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages: man man
FreeBSD directory layout: man hier
Edit /etc/motd to change this login announcement.
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 4.51G 65.2G 96K /zroot
zroot/owncloud-data 96K 65.2G 96K /zroot/owncloud-data
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # mkdir /usr/local/owncloud-data
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # zfs set mountpoint=/usr/local/owncloud-data zroot/owncloud-data
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # zfs mount
zroot/iocage/jails/f6d5ba16-5356-11e5-8414-00215aa4de05/root /
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # zfs mount -a
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ # zfs mount
zroot/iocage/jails/f6d5ba16-5356-11e5-8414-00215aa4de05/root /
zroot/owncloud-data /usr/local/owncloud-data
root@f6d5ba16-5356-11e5-8414-00215aa4de05:~ #
Thanks again for your time.
Op 04/09/15 om 22:23 schreef Peter Toth: