From owner-freebsd-questions@freebsd.org Thu Dec 5 07:21:47 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D73D21BF173 for ; Thu, 5 Dec 2019 07:21:47 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (enterprise.ximalas.info [IPv6:2001:700:1100:1::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ximalas.info", Issuer "Hostmaster ximalas.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47T6bY1GRWz3PXC for ; Thu, 5 Dec 2019 07:21:44 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (Ximalas@localhost [127.0.0.1]) by enterprise.ximalas.info (8.15.2/8.15.2) with ESMTPS id xB57LUYa003534 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Thu, 5 Dec 2019 08:21:30 +0100 (CET) (envelope-from trond.endrestol@ximalas.info) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ximalas.info; s=default; t=1575530491; bh=AJzOQOG81x/i208sieBkom6W9gnhgqeD4QH1Mqj0UQE=; h=Date:From:To:Subject:In-Reply-To:References; b=EnUbpWF5/wmA1+4ROwHwudlXpKZHkcZeexR4G64nS1tJh/Q2C1FF1Uer2EOLprl+a 36WSvhU5654dZpbjw7qTPBlNP4p/W+aOP8oxa81VNnPOhUhd5gGuJVHxzTErXYV9go gPS/kVRe37S8btql69YJ2ck7I4s0DyzWyyh4SW+gwLA3c3Fi8jS1Y454YGfP9JFWv9 o7+I2nxFRXasb72P4Ccm6gI+aOniGLKrzL6oEpWOhZ0ddRTquWgWwPLY1rwDOGWZZ7 Fk4LtG2x91FBtoCAXD+l2wA4Ti+Ywqjt3EGRiQDltAnNxrsQbXibD8Hrpo0Uw/P98O 31fObScQbuvbw== Received: from localhost (trond@localhost) by enterprise.ximalas.info (8.15.2/8.15.2/Submit) with ESMTP id xB57LUap003531 for ; Thu, 5 Dec 2019 08:21:30 +0100 (CET) (envelope-from trond.endrestol@ximalas.info) X-Authentication-Warning: enterprise.ximalas.info: trond owned process doing -bs Date: Thu, 5 Dec 2019 08:21:30 +0100 (CET) From: =?UTF-8?Q?Trond_Endrest=C3=B8l?= Sender: Trond.Endrestol@ximalas.info To: FreeBSD Questions Subject: Re: Moving root on ZFS on GELI so GELI is no longer used In-Reply-To: <20191204223149.A880630600A8@mailuser.nyi.internal> Message-ID: References: <20191204223149.A880630600A8@mailuser.nyi.internal> User-Agent: Alpine 2.21.99999 (BSF 352 2019-06-22) OpenPGP: url=http://ximalas.info/about/tronds-openpgp-public-key MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on enterprise.ximalas.info X-Rspamd-Queue-Id: 47T6bY1GRWz3PXC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ximalas.info header.s=default header.b=EnUbpWF5; dmarc=pass (policy=none) header.from=ximalas.info; spf=pass (mx1.freebsd.org: domain of trond.endrestol@ximalas.info designates 2001:700:1100:1::8 as permitted sender) smtp.mailfrom=trond.endrestol@ximalas.info X-Spamd-Result: default: False [-4.88 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[ximalas.info:s=default]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[ximalas.info:+]; DMARC_POLICY_ALLOW(-0.50)[ximalas.info,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:224, ipnet:2001:700::/32, country:NO]; IP_SCORE(-1.88)[ip: (-7.67), ipnet: 2001:700::/32(-1.07), asn: 224(-0.65), country: NO(-0.01)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2019 07:21:47 -0000 On Wed, 4 Dec 2019 22:31-0000, Kralj Karlo wrote: > I selected the installer option for putting root on ZFS on GELI. > I want to switch the system so that GELI is not used. (That is, > the zpool should be on the disk directly.) > > I figure I will replicate the zpool (currently a mirror of two GELI > devices) to the new disk and also do something so that the boot stuff > is on the disk and the boot stuff does not point to the GELI disk. > The part I don't know how to do is changing the boot stuff. > > Are there directions on how to do this? If there is nothing specific, > could you suggest which manual pages I should read? man zfs, searching for zfs snapshot, zfs send, and zfs receive. My take usually is: 1. Make sure boot partitions are present and populated on the new disk(s). The same for any swap partitions. 2. Create a new pool. 3. Create a recursive snapshot from the top of the existing rootpool, e.g. zfs snap -r rootpool@transfer 4. Send and receive a replicating stream, e.g. zfs send -RLe rootpool@transfer | zfs recv -Fduv newpool The results of zfs send can be saved as a file and later transferred using zfs recv, if you prefer this over a pipeline. 5. Remove the recursive snapshots, e.g. zfs destroy -Rv rootpool@transfer zfs destroy -Rv newpool@transfer 6. Set the bootfs property, if necessary, e.g. zpool set bootfs=newpool/something newpool 7. Reboot using newpool. -- Trond.