john terragon posted on Thu, 04 Sep 2014 07:30:37 +0200 as excerpted: > dm-0 is the first dmcrypt device of a pair on which I have > btrfs in RAID0 (btrfs native raid). > > I assume that a scrub would not do any good since it seems to be > related to btrfs data structures more than actual file data[.] On btrfs raid0 scrub can't fix anything anyway, tho it might give you a bit more information about problems it finds. The only thing scrub does is verify block checksums and if there's a second copy (as there is in single-device dup mode for metadata, and multi-device raid1 and raid10 modes, raid5/6 scrub is still broken), verify its checksum and assuming it verifies, rewrite the bad copy with the new copy. The same thing happens in normal operation if btrfs happens to come across the problem, but scrub gives you a way to systematically check the entire filesystem. If there's no valid second copy, either because the block was in a single- copy chunk (btrfs raid0 or single mode) or because the second copy is bad or the device it was on is missing (raid1/10 with a missing device), there's obviously no good copy to overwrite the bad one with, so the problem cannot be fixed. However, if it's in a data chunk, scrub should log the file it was part of. For metadata you simply get a number, and have to use btrfs debugging tools to figure out what's affected. Since you said you're using btrfs raid0 mode, there's no second copy, so scrub might find bad checksums and give you a bit of additional information about what's affected, but it can never fix them, because there's no second copy to fix them from. Scrub for btrfs raid0 (or single, and scrub for raid56 modes remains broken) mode is thus purely diagnostics, no possibility of fix, at least from scrub. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
