Re: Need help with btrfs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 21, 2021 at 4:16 PM George R Goffe <grgoffe@xxxxxxxxx> wrote:
>>  On Sunday, February 21, 2021, 1:48:52 PM PST, Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:


> That works for me. But you could alternatively try:
>
> mount /dev/vdb /mnt/btrfs
> losetup -r /dev/loop0 /mnt/btrfs/ext2_saved/image
> # losetup
> NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                     DIO LOG-SEC
> /dev/loop0         0      0         0  1 /export/home/ext2_saved/image   0     512
>
> blkid /dev/loop0
> # this command responds with nothing

That happens if there's no signature or when running the command as an
unprivileged user.


> # the file command responds with:
> # file /export/home/ext2_saved/image
> #/export/home/ext2_saved/image: ERROR: cannot read `/export/home/ext2_saved/image' (Input/output error)

That's not good. What do you see in dmesg at the time of this error?

What about:
e2fsck -fvn /dev/loop0

If this file is somehow damaged, I'm skeptical that rolling back the
conversion to ext4 will succeed. But that's not the only option...

A bit involved but it's possible to use device-mapper to create an
overlay block device, i.e. keep this ext2_saved/image file as
read-only and redirect writes to a sparse file, thereby making change
reversible. And then use e2fsck -b to specify a backup super block for
repair.

Sooo :D this guide is designed to make it easy to setup many such
overlays for RAID recovery. You could either  use it as-is, or
deconstruct it for just the single device you have - where your device
is loop0 since it's an image file you're trying to recover.

https://raid.wiki.kernel.org/index.php/Recovering_a_failed_software_RAID#Making_the_harddisks_read-only_using_an_overlay_file



-- 
Chris Murphy
_______________________________________________
test mailing list -- test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to test-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/test@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux