btrfs-check
Check or repair a btrfs filesystem. tldr-pages
On Linux
Linux
Check a btrfs filesystem
sudo btrfs [c path/to/partitionIdentifyCheck and repair a btrfs filesystem (dangerous)
sudo btrfs [c --repair path/to/partitionIdentifyShow the progress of the check
sudo btrfs [c --progress path/to/partitionIdentifyVerify the checksum of each data block (if the filesystem is good)
sudo btrfs [c --check-data-csum path/to/partitionIdentifyUse the n-th superblock (n can be 0, 1, or 2)
sudo btrfs [c --super n path/to/partitionIdentifyRebuild the checksum tree
sudo btrfs [c --repair --init-csum-tree path/to/partitionIdentifyRebuild the extent tree
sudo btrfs [c --repair --init-extent-tree path/to/partitionIdentify