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

37
linux/btrfs-check Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# btrfs check
> Check or repair a btrfs filesystem.
> More information: <https://btrfs.readthedocs.io/en/latest/btrfs-check.html>.
- 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}}`