1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-01 07:55:38 +02:00
tldr/pages/linux/btrfs-scrub.md

30 lines
868 B
Markdown
Raw Normal View History

2021-01-07 11:06:18 +00:00
# btrfs scrub
> Scrub btrfs filesystems to verify data integrity.
> It is recommended to run a scrub once a month.
> More information: <https://btrfs.readthedocs.io/en/latest/btrfs-scrub.html>.
2021-01-07 11:06:18 +00:00
- Start a scrub:
2025-07-20 01:28:02 +03:00
`sudo btrfs {{[sc|scrub]}} start {{path/to/btrfs_mount}}`
2021-01-07 11:06:18 +00:00
- Show the status of an ongoing or last completed scrub:
2025-07-20 01:28:02 +03:00
`sudo btrfs {{[sc|scrub]}} status {{path/to/btrfs_mount}}`
2021-01-07 11:06:18 +00:00
- Cancel an ongoing scrub:
2025-07-20 01:28:02 +03:00
`sudo btrfs {{[sc|scrub]}} {{[c|cancel]}} {{path/to/btrfs_mount}}`
2021-01-07 11:06:18 +00:00
- Resume a previously cancelled scrub:
2025-07-20 01:28:02 +03:00
`sudo btrfs {{[sc|scrub]}} {{[r|resume]}} {{path/to/btrfs_mount}}`
2021-01-07 11:06:18 +00:00
- Start a scrub, but do not put the program in the [B]ackground:
2021-01-07 11:06:18 +00:00
2025-07-20 01:28:02 +03:00
`sudo btrfs {{[sc|scrub]}} start -B {{path/to/btrfs_mount}}`
2021-01-07 11:06:18 +00:00
- Start a scrub in quiet mode (does not print errors or statistics):
2025-07-20 01:28:02 +03:00
`sudo btrfs {{[sc|scrub]}} start {{[-q|--quiet]}} {{path/to/btrfs_mount}}`