On 2/24/21 20:48, Chris Murphy wrote:
On Tue, Feb 23, 2021 at 2:26 PM pmkellly@frontier.com pmkellly@frontier.com wrote:
I recall a long and detailed discussion on this list before F33 was released concerning what disk maintenance would be required with BTRFS. As I recall, the final word was along the lines the running Scrub and the other BTRFS utilities wouldn't be necessary since it was being set up so maintenance shouldn't be needed.
Correct. Most of the time, for most users, what's provided is self maintaining in Brfs kernel code. If there's necessary maintenance not provided by the kernel, then it should be scheduled, e.g. a systemd timer kicks off a service unit.
Out of curiosity I ran scrub on the four machines I have handy here. I always do clean installs so the btrfs doesn't have a lot of time on it; just since F33 was released.
Scrub gives no indication that it's running other than the PID. Nor does it indicate when it's complete; so I had to monitor the PID to know when it was done. Then I had to run:
sudo btrfs scrub status -dR /mnt
to find the results. Do you know if anyone has some code that runs scrub and gets the status and reports it after scrub is complete?
None of the four machines showed any problem.
Running scrub and getting the status might be good for people who do upgrade instead of doing clean installs. Maybe even a before and after upgrade might be revealing. Perhaps a special test day for machines that have been running the prior version for 6 months.
There was also some hesitancy to call for running scrub because, depending on how often it's run Scrub can be hard on SSDs (they wear out faster).
Scrub is mostly a read-only operation involving the verification of checksums for all file system metadata and file data. There's no concern on wear, you could run it every day if you wanted to.
I thought sure that there was one of the btrfs utilities that was hard on SSDs if run regularly. Please refresh my memory.
But other considerations are how long it will take, how much CPU is used, and will it slow down the computer until it completes?
Yes hence the need to know when it's done. Progress indication might be good too. One of the machines I ran it on yesterday was an old Core Duo. Running scrub wasn't noticeable, but the FS content is small on that machine, the run time was seconds. On an AMD machine with 8 cores, but a big (not huge) FS content took minutes maybe 3.
Have a Great Day!
Pat (tablepc)