Linux command
btrfs-scrub 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Start
sudo btrfs scrub start path/to/mount
Example
sudo btrfs scrub status path/to/mount
Cancel
sudo btrfs scrub cancel path/to/mount
Resume
sudo btrfs scrub resume path/to/mount
Example
sudo btrfs scrub start -B path/to/mount
Example
sudo btrfs scrub start -q path/to/mount
说明
btrfs scrub verifies data integrity on btrfs filesystems by reading all data and metadata blocks and checking their checksums. It is recommended to run a scrub monthly to detect and potentially repair corrupted data.
参数
- start
- Start a scrub operation
- status
- Show status of running or last completed scrub
- cancel
- Cancel a running scrub
- resume
- Resume a cancelled scrub
- -B
- Do not run in background (foreground mode)
- -q, --quiet
- Suppress errors and statistics output
- -r
- Read-only mode - do not attempt repairs
- -d
- Print separate statistics for each device in the filesystem
- -R
- Raw print mode - print statistics without units
FAQ
What is the btrfs-scrub command used for?
btrfs scrub verifies data integrity on btrfs filesystems by reading all data and metadata blocks and checking their checksums. It is recommended to run a scrub monthly to detect and potentially repair corrupted data.
How do I run a basic btrfs-scrub example?
Run `sudo btrfs scrub start path/to/mount` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does start do in btrfs-scrub?
Start a scrub operation