Re: when to btrfs scrub, was: Need help with btrfs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 25, 2021 at 7:25 AM pmkellly@xxxxxxxxxxxx
<pmkellly@xxxxxxxxxxxx> wrote:

> 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 is pretty performant regardless of file system age.

> 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?

You can use 'btrfs scrub status /mnt' to see status of scrub
in-progress or the results of the most recent scrub.

An alternative is 'btrfs scrub start -BdR' which will not background
the scrub, and will give a detailed report upon completion.

Most things Btrfs are implemented in the kernel, so you'll see most
messages related to Btrfs in dmesg.

> None of the four machines showed any problem.

That is the usual case. I have file systems going back years without
showing checksum errors.


> 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.

Checksum errors are almost always hardware related.


> I thought sure that there was one of the btrfs utilities that was hard
> on SSDs if run regularly. Please refresh my memory.

Perhaps 'btrfs balance' - which should really only be used with
filters to limit the rewriting of the file system for specific goal.
There's no reason to run it just to run it, as it does mean reading
every block and writing them elsewhere (into free space).

> > 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.

dmesg will tell you when it's done as will 'btrfs scrub status'.

I suspect upstream would accept an enhancement for 'btrfs scrub start
-B' (don't background) such that it has a progress indicator similar
to btrfs-convert or other implementation.

-- 
Chris Murphy
_______________________________________________
test mailing list -- test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to test-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/test@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux