Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Recovery Questions #676

Open
Ironlenny opened this issue May 9, 2024 · 3 comments
Open

Data Recovery Questions #676

Ironlenny opened this issue May 9, 2024 · 3 comments

Comments

@Ironlenny
Copy link

Ironlenny commented May 9, 2024

So I was a dumbass and intentionally overwrote my Bcachefs caching device during a system upgrade, thinking I could just mount the backing device. I honestly don't know what I was thinking.

What options do I have to recover my data? Is it possible to attach the backing device to a bcache device? To a new bcachefs filesystem? Will a utility like TestDisk help? Am I just hosed?

Edit: I do have backups, but I don't know how recent they are.

@raldone01
Copy link

What was the setup of your bcachefs? (Format command)

If you plug in all the remaining drives and try to mount one of them what is the error output in your terminal and dmesg?

You may be able to recover some data by mounting with fsck,fix_errors mount options. You should create a backup copy (dd or pv) of all bcache drives before doing so. Also unplug the backups and verify them on another machine to avoid further human error.

@notcancername
Copy link

Out of curiosity: since cache devices have durability=0, shouldn't mounting the backing device be perfectly fine?

@raldone01
Copy link

raldone01 commented Jun 4, 2024

Well it depends on the type of cache that was used. A writeback cache would be problematic. A writethrough cache should be no problem. That's why I asked for the format command. Bcachefs is very flexible when it comes to the specific cache type used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants