Date: Tue, 26 Dec 2023 21:14:01 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> To: Michael Grimm <trashcan@ellael.org> Cc: freebsd-fs@freebsd.org Subject: Re: Howto migrate a FreeBSD cloud instance to another one without native FreeBSD support? Message-ID: <f87ebfd8-fe81-4aa3-9f60-87ccb53cc2c2@quip.cz> 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
On 26/12/2023 19:41, Michael Grimm wrote: > Miroslav Lachman <000.fbsd@quip.cz> wrote; [..] >> 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). > 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? I used Linux fdisk about a 15 years ago so I am not the right person to help in this. > Namely, which kind of booting to use (legacy versus EFI)? Legacy (BIOS) or EFI boot is matter of what OVH supports. FreeBSD and Linux supports both. Both will work for a years. >> 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. Do you use swap partition on your old instances? If yes, I would go with the path of creating minimalistic FreeBSD UFS image which you can dd in to target disk with the help of Linux rescue system. You can prepare the image of the size of your swap, write it by dd on to target disk (with the boot sector / boot partition), then you reboot to this FreeBSD instance where you can work with all the FreeBSD tools you like, edit or add partitions, create ZFS pool, use zfs recv etc.. And after all work is done, you can wipe content of this partition and use it as you swap on newly migrated FreeBSD instance. This partition can be few hundreds to 1 GB of size, just to fit the base installation of FreeBSD and tools you need to have for migration. Kind regards Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f87ebfd8-fe81-4aa3-9f60-87ccb53cc2c2>