Date: Thu, 18 Aug 2022 03:10:17 +0000 (UTC) From: doug <doug@safeport.com> To: Norman Gray <gray@nxg.name> Cc: freebsd-questions@FreeBSD.org Subject: Re: iocage template question. Message-ID: <68bed14a-8fa4-9063-6890-b1f68d396474@safeport.com> In-Reply-To: <c304e8e-fd87-6ee6-2dc-4a73bbe953cb@safeport.com> References: <80fe8cc8-2813-6478-b556-2224633f0ba@safeport.com> <37B45433-1B7B-4F04-B172-F9F80C46E5FF@nxg.name> <c304e8e-fd87-6ee6-2dc-4a73bbe953cb@safeport.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Aug 2022, doug@safeport.com wrote: > On Wed, 17 Aug 2022, Norman Gray wrote: > >> >> Doug, hello. >> >> On 17 Aug 2022, at 1:12, doug wrote: >> >>> I have several jails a few of which come from a template. Is there a way >>> of telling which jails are based on a given template? >> >> There may be a clever way within iocage itself, but if you do >> >> % zfs get -o name,value -r origin tank/iocage >> >> (where tank/iocage is the root dataset that iocage is using), then you'll >> see the 'origin' of each filesystem used by iocage >> >> There, you might see >> >> tank/iocage/jsils/JAIL1/root tank/iocage/templates/TEMPLATE1/root@JAIL1 >> tank/iocage/templates/TEMPLATE1/root >> tank/iocage/releases/13.1-RELEASE/root@TEMPLATE1 >> >> ...showing that JAIL1's /root is a clone of TEMPLATE1 at the snapshot >> @JAIL, and that that that template is a clone of the release at the >> snapshot @TEMPLATE1. >> >> So that, slightly indirectly, indicates the sequence of iocage jail >> creation. >> > So this turns into a zfs question for me. From zfs list: > > NAME USED AVAIL REFER MOUNTPOINT > zroot 2.48T 10.7T 1.66T legacy > zroot/iocage 844G 10.7T 4.28M /zroot > : > zroot/iocage/jails/waldo 6.75G 10.7T 247K /zroot/jails/waldo > zroot/iocage/jails/waldo/root 6.75G 10.7T 6.75G /root/jails/waldo/root > > The config file has: "jail_zfs_dataset": "iocage/jails/waldo/data" That > dataset name does not exist. I assume this is something iocage uses. My takes > on trying your command: > > zfs get -o name,value -r origin zroot/iocage/jails/waldo > NAME VALUE > zroot/iocage/jails/waldo - > zroot/iocage/jails/waldo/root - > > I might as well describe my "real" problem. I "know" that a set of jails > including waldo were created from a template because in moving to a new data > center we obviously have to change resolv.conf. Restarting to the jail resets > resolv.conf to the template value. There are some obvious file system changes > that are probably okay, gonna test that throught first though. > On my test system I made aether a thin jail using safeport as a template. So the 'zfs get' as shown will not find template dependencies. zfs get -o name,value -r origin zroot/iocage NAME VALUE zroot/iocage - zroot/iocage/jails/aether - zroot/iocage/jails/aether/root - zroot/iocage/jails/gaia/root zroot/iocage/releases/11.2-RELEASE/root@gaia zroot/iocage/jails/mneme/root zroot/iocage/releases/12.2-RELEASE/root@mneme zroot/iocage/jails/odin/root zroot/iocage/releases/11.2-RELEASE/root@odin zroot/iocage/jails/thinman - zroot/iocage/jails/thinman@aether - zroot/iocage/jails/thinman/root zroot/iocage/releases/11.2-RELEASE/root@thinman zroot/iocage/jails/thinman/root@aether - zroot/iocage/jails/thor/root zroot/iocage/releases/9.1-RELEASE/root@thor zroot/iocage/templates/safeport - zroot/iocage/templates/safeport/root zroot/iocage/releases/12.2-RELEASE/root@safeport So I have a lot of fiddling left to do.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?68bed14a-8fa4-9063-6890-b1f68d396474>