Re: BTRFS partition corrupted after deleting files in /home

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

 



1. If you don't have a backup of important data, you should first use
'btrfs restore' as I've described in previous emails. The fsck should
fix the problem, but there is a chance it makes things worse. No fsck
is guaranteed safe, because it's making changes to the file system.

2. Install the following updated btrfs-progs branch that has a tested
fix for this problem. And by the way your test image has helped
improve the Btrfs fsck. Pretty much all fsck improvements for all file
systems depend on getting good user reports and information. So thanks
for not giving up.

sudo dnf install
https://download.copr.fedorainfracloud.org/results/ngompa/btrfsprogs-robustimg/fedora-33-x86_64/01873195-btrfs-progs/btrfs-progs-5.9+git20210108.3783313-0.fc33.1.x86_64.rpm

3. If it's a laptop, make sure it has power connected, and that you
can let it run until it finishes. Because it's going to take a long
time. I don't have a time estimate for what that means exactly, it
depends mostly on memory.

4. This is the command to run, good idea to save all the terminal
output because if it doesn't work we need to see what went wrong.

sudo btrfs check --repair /dev/sdXY

Near the end I'm told there will be complaints about missing csum
errors. Ignore that for now. And try to mount normally. You should be
able to use it normally at this point. And there should be no errors
in dmesg. If there are let me know before the next step.

5. There are some checksums that didn't make it to the drive when the
original problem happened. That has a separate repair:

sudo btrfs check --init-csum-tree /dev/sdXY


That's it, everything should be OK. If something goes wrong, best to
not try again, just ask here or on IRC.

--
Chris Murphy
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-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/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux