Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Dec 2023 23:24:05 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Michael Grimm <trashcan@ellael.org>
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?
Message-ID:  <a9b41da0fc536a57f038fc8563306e21@Leidinger.net>
In-Reply-To: <A54A7120-FEA8-4E67-9613-2C27A665B90F@ellael.org>
References:  <4A6398FE-5DC1-45A1-85A9-7C5054CF5BF7@ellael.org> <cd7491fd-aec6-4023-9e93-4de3f59f6bbe@quip.cz> <A54A7120-FEA8-4E67-9613-2C27A665B90F@ellael.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <imagefile" or "zstd <imagefile | ssh me@target 
unzstd \| dd of=/dev/sda" (it helps to create a authorized_keys entry on 
the target system). After rebooting into the system, a gpart recover and 
a gpart resize, followed by setting autoexpand=on on the pool.

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF

--=_1ebca81641bc5a170a85d90bc4b02ee6
Content-Type: application/pgp-signature;
 name=signature.asc
Content-Disposition: attachment;
 filename=signature.asc;
 size=833
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmWLUpcACgkQEg2wmwP4
2IY6JhAApMyUFqn8ds6qQ2V1iUbd4i8TiMq/4nGrma3fe8Qs4nSVOZ1B6xAwmxII
ArBk/FCpRD7gG17wPgXBLS/ZuU1Y87fbs0QM5JFN0GfNP8OeViMYtH5coAhiA6ah
ZqDszqFNNvKb8eXjGzc1QPKT2uAeZT4f/Vjhk/GTLP212ewGJRk32ggYt5zelN7U
JpyBY8vFJki3EcpgO/Zt3QtLk9givuVm5xIM/9BD5nF7b1mCQrv98v7aKkObAWiM
ap7c8Tt9sPOVNHtj+XpKYcEN0d0SK0Z2keWnwI+D352wsduQreDmf56Mlru9C/EX
FKgnBW2OIGHQUl7m2AA/cEnEfQ9VWFVPJTrXu9iJ15ggLlT0t6Hbitf8l+U4Sv8s
WKpttcxhbX7t92eZRLBKLE2o1usLL8aCOhEXEihUz3q2/FVM+qji43dGPb077CAz
KPGdnkzgvAL4ESJkjqL57tRZbJnCzctd8OGMW4Ee9p88LbEtfN6cbbywwHAV7FZ3
DCrKJU9V9k2gJAP1uzbepd138jDI9gfllzIlupvgHWfmW7oo8ZdLRC5xm1CZs+M7
ow8xpNd3CrjVFBR9OqOWkMIY2vgR0pee0X3Qc5OMwSM3WxY1R/NlhCA4efUowo/2
nd05AUEqJGZe2L+arx0WBHie9b17AD+Ljy8JGatlsqPDqmCZa6c=
=ade9
-----END PGP SIGNATURE-----

--=_1ebca81641bc5a170a85d90bc4b02ee6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a9b41da0fc536a57f038fc8563306e21>