From nobody Tue Dec 26 18:41:15 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 4T03Ws5JkCz55KRH for ; Tue, 26 Dec 2023 18:41:29 +0000 (UTC) (envelope-from trashcan@ellael.org) Received: from mx1.enfer-du-nord.net (mx1.enfer-du-nord.net [91.121.41.56]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4T03Ws3RVxz3HJn for ; Tue, 26 Dec 2023 18:41:29 +0000 (UTC) (envelope-from trashcan@ellael.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (p5b2e5c97.dip0.t-ipconnect.de [91.46.92.151]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.enfer-du-nord.net (Postfix) with ESMTPSA id 4T03Wp2X3xzmS2; Tue, 26 Dec 2023 19:41:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellael.org; s=dkim; t=1703616086; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uTqFAVp7EFJcWFBlOV/41veJaAJ7XSFSTeeGxwXP35M=; b=jO/GMZJLkXw/r3vzOEKXZnqICk4b+F9ytxgQznKgMoGUworYddGJx218cSwOPl1G60eJoj jwCLlFxrUfggOrcrFrVmvjOo6F5zMVd+ElxpW+9AEJO8ekEq1TN4/hso3ZIfYfrPBXeD5x mBqsPpPNumD4yCPD6yblJLdQwG3iLq08tvKHPfE8hwgYJTYZI+RGSBVQ/QM0yPcqBGayU6 3q/GXtz7nG2PcKXSCEoDBAwx+aNKCMpYefh3qRdM9nVMt2VhSPA/vsUiBimk7di5KgBSXL F/SgwxgTAVPf75Ach5MWRFkTbT3HNlL8S2+DdKEv4YuDQdjPJV2CxCHDD20TnA== Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: Howto migrate a FreeBSD cloud instance to another one without native FreeBSD support? From: Michael Grimm In-Reply-To: Date: Tue, 26 Dec 2023 19:41:15 +0100 Cc: freebsd-fs@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <4A6398FE-5DC1-45A1-85A9-7C5054CF5BF7@ellael.org> To: Miroslav Lachman <000.fbsd@quip.cz> X-Mailer: Apple Mail (2.3774.300.61.1.2) 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:16276, ipnet:91.121.0.0/16, country:FR] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4T03Ws3RVxz3HJn Miroslav Lachman <000.fbsd@quip.cz> wrote; > On 26/12/2023 15:22, Michael Grimm wrote: >> Hi, >> I do run FreeBSD 14.0-STABLE instances in OVH's public cloud for some = years already. Now, I do need to migrate my FBSD instances to new = instances (old ones are no longer supported). >> In the past one could create new instances running FBSD from the = start, but OVH has removed that option. I do have used Ubuntu rescue = systems in the past for my FBSD instances, thus I am familiar in using = Ubuntu's OpenZFS functionality. >> Sadly, OVH doesn't offer Linux systems installed on ZFS pools. Thus I = do have to stick to Linux systems without. >> Here are my questions regarding using Linux (Ubuntu) rescue systems: >> # What would be the closest equivalent to FBSD's gpart tool? >> gdisk, =E2=80=A6? >=20 >> # Would it be possible at all to go for legacy booting of FBSD? >> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 >> # Or, would it be better/easier to consider UEFI booting instead? >> rsync /boot/loader.efi to rescue system >> # Are there other promising strategies for migrating feasible? >=20 > I know nothing about OVH and almost nothing about what kind of FreeBSD = setup you want to migrate (partitions, UFS vs ZFS etc.) but one thing I = can imagine in you situation is creating everything from Linux rescue = (partitions, formatting to UFS or ZFS, boot sector, rsync old FreeBSD = instance to newly created...) 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).=20 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, = =E2=80=A6) 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. Regards, Michael=