From 9dc2d0cd86445e8786e802f569178f4bd4341a8b Mon Sep 17 00:00:00 2001 From: kyteinsky Date: Mon, 25 Oct 2021 21:14:30 +0000 Subject: [PATCH] btrfs-rescue: add page (#6963) --- pages/linux/btrfs-rescue.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/linux/btrfs-rescue.md diff --git a/pages/linux/btrfs-rescue.md b/pages/linux/btrfs-rescue.md new file mode 100644 index 0000000000..499595f64d --- /dev/null +++ b/pages/linux/btrfs-rescue.md @@ -0,0 +1,24 @@ +# btrfs rescue + +> Try to recover a damaged btrfs filesystem. +> More information: . + +- 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`