From nobody Tue Dec 26 22:24:05 2023 X-Original-To: freebsd-fs@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 4T08V26SJTz54QdN for ; Tue, 26 Dec 2023 22:25:14 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (bastille.leidinger.net [89.238.82.207]) (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 ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T08V22QsWz3bqL for ; Tue, 26 Dec 2023 22:25:14 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; none List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1703629499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GBcWlFFUMTgsIWdJb2V9dERZ0x/ZR1kZAb0/+D2zdGY=; b=rM716WQXluljnXTW8IrjoZlrsQ1Snj01qjbKorIJJ36X6iHS7egBfG+cEXomYgQDLemPbR AYKQJdX5voMgYGwaV3VCLJSMIU/Q7S3kOGs7xCm1YC2SrMGOjvdjNM0MzWQXApDYBe5lls b3EZnYfQ9Nsjk5MT2eqLV/cvQFRYEiCAbAvcTai4/fhi8C3lLHFp5k3x5LeLv6vlo5LSxv ZnoDDnvsFpmwW9B0JgHrPDUrSBaYVsnRcYE1tq2CglDow+3p3zPaL3i7Vm+V5QjGFPU4EM 5HounYE7j0uJjUXL2uF5VXUV80mTjBuwU7kGljqnxf9zrM9hEKBZhEiibIZJbQ== Date: Tue, 26 Dec 2023 23:24:05 +0100 From: Alexander Leidinger To: Michael Grimm Cc: Miroslav Lachman <000.fbsd@quip.cz>, freebsd-fs@freebsd.org Subject: Re: Howto migrate a FreeBSD cloud instance to another one without native FreeBSD support? In-Reply-To: References: <4A6398FE-5DC1-45A1-85A9-7C5054CF5BF7@ellael.org> Message-ID: Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_1ebca81641bc5a170a85d90bc4b02ee6"; micalg=pgp-sha256 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34240, ipnet:89.238.64.0/18, country:DE] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4T08V22QsWz3bqL This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_1ebca81641bc5a170a85d90bc4b02ee6 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Am 2023-12-26 19:41, schrieb Michael Grimm: > Miroslav Lachman <000.fbsd@quip.cz> wrote; >> On 26/12/2023 15:22, Michael Grimm wrote: > Sorry, if I haven't been clear enough: > > #) I do want to migrate an existing ZFS pool (from one instance to > another (zfs send | zfs receive). > This I have done numerous times before. > > #) New to me is the preparation of the target disk out of an > Ubuntu/Linux rescue system. > Namely, how to partition with Linux functionality (gdisk, cfdisk, …) > lacking gpart? > Namely, which kind of booting to use (legacy versus EFI)? > >> And the second is: you can prepare small minimalistic FreeBSD image in >> Bhyve / VirtualBox etc. make a copy of it with dd and then write it by >> dd to your new instance's disk with the help of Linux rescue system. >> Then you can reboot to a minimalistic FreeBSD system, enlarge >> partition(s), use growfs or zpool / zfs enlargement and then finally >> move data from the old instance to this new instance by rsync, or zfs >> send, or whatever tool you prefer. > > Thanks for this info, very much appreciated. This is more or less what I did for such a case (local provider, not OVH): I used an existing FreeBSD system, created a file of a few GB, dd-ed /dev/zero to it completeley (for a compressed transfer), created a md(4) out of the file, partitioned it, created a root pool, installed FreeBSD into it, created a suitable rc.conf and such to boot from it, and wrote it to the linux rescue system on the target host "ssh -C me@target dd of=/dev/sda