From af68b27c9cbfc7ee88a69878ea012557e138dd00 Mon Sep 17 00:00:00 2001 From: Vinh Quang Tran Date: Thu, 14 Oct 2021 17:08:24 +0700 Subject: [PATCH] btrfs-check: add page (#6959) --- pages/linux/btrfs-check.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pages/linux/btrfs-check.md diff --git a/pages/linux/btrfs-check.md b/pages/linux/btrfs-check.md new file mode 100644 index 000000000..4eedab399 --- /dev/null +++ b/pages/linux/btrfs-check.md @@ -0,0 +1,32 @@ +# btrfs check + +> Check or repair a btrfs filesystem. +> More information: . + +- Check a btrfs filesystem: + +`sudo btrfs check {{path/to/partition}}` + +- Check and repair a btrfs filesystem (dangerous): + +`sudo btrfs check --repair {{path/to/partition}}` + +- Show the progress of the check: + +`sudo btrfs check --progress {{path/to/partition}}` + +- Verify the checksum of each data block (if the filesystem is good): + +`sudo btrfs check --check-data-csum {{path/to/partition}}` + +- Use the `n`-th superblock (`n` can be 0, 1 or 2): + +`sudo btrfs check --super {{n}} {{path/to/partition}}` + +- Rebuild the checksum tree: + +`sudo btrfs check --repair --init-csum-tree {{path/to/partition}}` + +- Rebuild the extent tree: + +`sudo btrfs check --repair --init-extent-tree {{path/to/partition}}`