My setup is a single disk, single btrfs subvolume (/) without a
separate boot partition.
I resolved the issue like this from a Live CD:

1 - take a (read-only) snapshot of the current problematic root system
and use send-receive to another BTRFS disk
2 - re-format the original partition as btrfs (mkfs.btrfs is enought)
and mount it under /mnt (I added -o compress=lzo)
3 - cp -arv  the files from the other disk subovlume to the newly
formatted partition, /mnt
4 - chroot to the new partition:
    # cd /mnt
    # mount --bind /sys sys/
    # mount --bind /dev dev/
    # mount --bind /proc proc/
    # chroot /mnt /bin/bash
5 - re-install grub:
    # update-grub
    # grub-install
6 - edited the /mnt/etc/fstab entry to match the new blkid /dev/sda1
7 - reboot magically brought me to the original system.
8 - reboot again in LiveCD, and using btrfs-tools 4.10.2 I ran a
lowmem check without errors.

So the bottom line is that send-receive did not carry over the
problems and that cp -arv is good enough to clone the partition, but
you need to manually install the bootloader. Maybe Boot-repair could
have done it, not sure.
Also I was unable to find a way to send-receive a snapshot to the root
subvolume of a different disk. Is this possible?

Thanks for the help and may this solution remain on the internet for
anyone that has a similar issue.

On Mon, May 8, 2017 at 3:02 PM, Sean Greenslade <s...@seangreenslade.com> wrote:
> On Mon, May 08, 2017 at 02:22:52PM -0400, Alexandru Guzu wrote:
>> Getting a bit off-topic here, but were you able to boot from that fs
>> with grub after a simple rsync?
>
> Grub was installed to the MBR, and /boot was a separate partition, so I
> didn't have to re-install grub. I did have to edit the root partition
> UUID in /etc/fstab and in the kernel command line in grub.cfg, though.
>
> --Sean
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to