5

I am going to use (for now) btrfs on a couple of external USB HDD archives, in single-mode (no DUP, no RAID, no nothing; I will just keep it simple for now). So my idea is that I have two (manually copied) identical copies of an archive on two separate btrfs USB HDDs, one being the main where I change the archive and sometimes copy all the changed stuff to the other USB HDD.

The reason I want to use btrfs is merely that I can easily check at any time whether the all files on the main archive ok, and if not, I can copy those files back from the other HDD, manually. So I presume I will use btrfs scrub for finding the errors, and then e.g. Finding files with BTRFS Uncorrectable Errors to find which files have those errors and need to be replaced from the backup.

However, I also see there is a "btrfs check" command as well. Reading both scrub and check manual pages, it wasn't clear to me what the difference is and what their exact purpose is.

So if I just want to see whether my btrfs volume's files are ok with no errors and bitrot and corruption, am I supposed to run both check and scrub, or is mere scrub enough?

timppu
  • 117

1 Answers1

0

I think rickhg12s in the comments had the right answer:

"btrfs check seems to verify and optionally attempt repair of the structure of the filesystem. btrfs scrub verifies (and possibly repairs) the checksums of every data and metadata block."

timppu
  • 117