Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

29
linux/btrfs-rescue Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# btrfs rescue
> Try to recover a damaged btrfs filesystem.
> More information: <https://btrfs.readthedocs.io/en/latest/btrfs-rescue.html>.
- Rebuild the filesystem metadata tree (very slow):
`sudo btrfs rescue chunk-recover {{path/to/partition}}`
- Fix device size alignment related problems (e.g. unable to mount the filesystem with super total bytes mismatch):
`sudo btrfs rescue fix-device-size {{path/to/partition}}`
- Recover a corrupted superblock from correct copies (recover the root of filesystem tree):
`sudo btrfs rescue super-recover {{path/to/partition}}`
- Recover from an interrupted transactions (fixes log replay problems):
`sudo btrfs rescue zero-log {{path/to/partition}}`
- Create a `/dev/btrfs-control` control device when `mknod` is not installed:
`sudo btrfs rescue create-control-device`