On Jul 26, 2024, at 06:35, Patrick O'Callaghan <pocallag...@gmail.com> wrote:
> 
> On Wed, 2024-07-24 at 11:14 +0100, Patrick O'Callaghan wrote:
>>> On Tue, 2024-07-23 at 20:44 -0700, Gregorio Gervasio Jr. wrote:
>>> I just did this recently.  I used "btrfs replace", which is part
>>> of
>>> btrfs-progs.  See "man btrfs-replace" for details.
>>> It initially refused for one of my partitions (forgot the exact
>>> error
>>> message) but it worked after I ran "btrfs balance".
>>> --
>> Thanks. I'm slightly wary of clonezilla because multiple people seem
>> to
>> have had problems with it on BTRFS (may depend on the version). Also,
>> btrfs-replace is built-in and looks like it will do the job.
> 
> My mistake. btrfs-replace is for replacing a whole disk as part of a
> BTRFS filesystem. In my case I have a vfat EFI partition, an ext4 /boot
> partition, and a BTRFS root+/home partition, so btrfs-replace isn't
> going to do it.
> 
> I can copy each partition separately (using btrfs-clone for root+/home)
> and rsync for the others, but I'm not sure if I need to run grub2-
> mkconfig as well.

The “btrfs-replace” command can be used to do this. I use it in automation to 
migrate a btrfs filesystem on an unencrypted volume to a luks volume. All on 
one disk. 

You do need to manually recreate the efi and boot partition, identify the UUID 
of the /boot partition so grub can find it, as well as the fstab. New fstab 
means new initrds. Lastly you’ll need to create a new EFI boot entry. 

--
Jonathan Billings
-- 
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to