On 8/5/20 9:21 pm, Graham Cobb wrote: > If you are worried that it is somehow looping (bytes scrubbed going up > but not really making progress), use: > > btrfs scrub status -dR /home Aha! That's what I was looking for. > and look at last_physical (for each disk) - it should be always increasing. > > Also, there have been bugs in cancel/resume in the past. There could be > more bugs lurking there, particularly for multi-device filesystems. Apparently! Unfortunately since scrub blocks suspend, I have to use cancel/resume in my suspend pre/post scripts. > If you are going to cancel and resume, check last_physical for each > device before the cancel (using 'status -dR') and after the resume and > make sure they seem sensible (not gone backwards, or skipped massively > forward, or started again on a device which had already finished). $ sudo btrfs scrub status -dR /home UUID: 85069ce9-be06-4c92-b8c1-8a0f685e43c6 scrub device /dev/sda (id 1) status Scrub started: Thu May 7 15:44:21 2020 Status: running Duration: 5:40:13 data_extents_scrubbed: 51856478 tree_extents_scrubbed: 431748 data_bytes_scrubbed: 3228367126528 tree_bytes_scrubbed: 7073759232 read_errors: 0 csum_errors: 0 verify_errors: 0 no_csum: 179858 csum_discards: 0 super_errors: 0 malloc_errors: 0 uncorrectable_errors: 0 unverified_errors: 0 corrected_errors: 0 last_physical: 0 scrub device /dev/sdb (id 2) status Scrub started: Thu May 7 15:44:21 2020 Status: running Duration: 5:40:16 data_extents_scrubbed: 52452792 tree_extents_scrubbed: 431756 data_bytes_scrubbed: 3266540351488 tree_bytes_scrubbed: 7073890304 read_errors: 0 csum_errors: 0 verify_errors: 0 no_csum: 182034 csum_discards: 0 super_errors: 0 malloc_errors: 0 uncorrectable_errors: 0 unverified_errors: 0 corrected_errors: 0 last_physical: 0 last_physical is zero. That doesn't seem right. Cheers, Andrew
