From nobody Wed Aug 17 19:00:17 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M7HQY2jW5z4Yysl for ; Wed, 17 Aug 2022 19:00:21 +0000 (UTC) (envelope-from doug@safeport.com) Received: from fledge.watson.org (fledge.watson.org [147.160.157.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "A1-48603", Issuer "A1-48603" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M7HQX4DTnz4JQJ for ; Wed, 17 Aug 2022 19:00:20 +0000 (UTC) (envelope-from doug@safeport.com) Received: from fledge.watson.org (doug@localhost [127.0.0.1]) by fledge.watson.org (8.16.1/8.16.1) with ESMTPS id 27HJ0JEc089592 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 17 Aug 2022 19:00:19 GMT (envelope-from doug@safeport.com) Received: from localhost (doug@localhost) by fledge.watson.org (8.16.1/8.16.1/Submit) with ESMTP id 27HJ0H3f089587; Wed, 17 Aug 2022 19:00:17 GMT (envelope-from doug@safeport.com) X-Authentication-Warning: fledge.watson.org: doug owned process doing -bs Date: Wed, 17 Aug 2022 19:00:17 +0000 (UTC) From: doug@safeport.com To: Norman Gray cc: freebsd-questions@FreeBSD.org Subject: Re: iocage template question. In-Reply-To: <37B45433-1B7B-4F04-B172-F9F80C46E5FF@nxg.name> Message-ID: References: <80fe8cc8-2813-6478-b556-2224633f0ba@safeport.com> <37B45433-1B7B-4F04-B172-F9F80C46E5FF@nxg.name> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Rspamd-Queue-Id: 4M7HQX4DTnz4JQJ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=fail (mx1.freebsd.org: domain of doug@safeport.com does not designate 147.160.157.40 as permitted sender) smtp.mailfrom=doug@safeport.com X-Spamd-Result: default: False [-2.10 / 15.00]; R_SPF_FAIL(1.00)[-all]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-questions@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:6405, ipnet:147.160.157.0/24, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NO_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; HAS_XAW(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[safeport.com]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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.