btrfscktool is used to check and repair btrfs filesystems. This tool is still in early development and may not detect or repair all types of filesystem corruption.
btrfsckdoes not make changes to the filesystem; that is, it runs check-only mode by default. If repairs are desired the
--repairoption must be specified.
The following three basic phases are performed by
- Extent checks.
- Filesystem root checks.
- Root reference count checks.
btrfs-image(8)utility can be used to create a metadata image prior to repair for diagnostic or testing purposes.