Posted Oct 12, 2011 6:27 UTC (Wed) by njs (guest, #40338)
[Link]
In most situations I find I actually prefer "here's an accurate snapshot, it's 12 hours old" to "here's an up-to-the-minute copy of the data recovered as best we could, maybe your files are all correct and maybe some are corrupted, who knows?".
Which isn't to say that fsck doesn't have its uses -- most people don't have proper backups in the first place, and after things go pear-shaped, fsck is your last hope. And it can be faster than restoring from backup. And perhaps btrfsck will be better than other fsck's, in that it could potentially use btrfs's hashes to give you a list of which files might be corrupted, so you can check them (or recover just them from a backup).
I'm just saying, fsck is nice to have, but it's not *that* critical.
Whither btrfsck?
Posted Oct 12, 2011 8:52 UTC (Wed) by rvfh (subscriber, #31018)
[Link]
> In most situations I find I actually prefer "here's an accurate snapshot, it's 12 hours old" to "here's an up-to-the-minute copy of the data recovered as best we could, maybe your files are all correct and maybe some are corrupted, who knows?".
That's whole point isn't it? If the fsck is not able to restore the data and gives you crap instead, then it's useless, and that's why Chris does not want it in the wild!
We need fsck, and we need it to work correctly.
Whither btrfsck?
Posted Oct 12, 2011 18:43 UTC (Wed) by njs (guest, #40338)
[Link]
> If the fsck is not able to restore the data and gives you crap instead, then it's useless
But, IIUC, this is exactly what existing fsck's do. If they can recover data, great, but their main priority is to make the filesystem data structures internally consistent again. If that means randomly making up data that's missing, throwing away some files whose metadata got confused, etc., then oh well, too bad.
Hopefully btrfsck will have a mode where it uses the checksumming information to give you a guaranteed-accurate list of which files were left in an inconsistent state with potentially screwed up contents, but if so then that will be a fancy unique feature that has never been seen in a mainstream Linux fsck before. (And does btrfs even keep data checksums by default?)
I can understand why Chris doesn't want to release a known-buggy fsck, but let's be realistic about what a bug-free fsck actually does...
Whither btrfsck?
Posted Oct 12, 2011 15:20 UTC (Wed) by edt (subscriber, #842)
[Link]
One point. With btrfs setup to use a mirror it should be possible to tell exactly which files, if any, are corrupt post fsck. All those checksums can be really handy...
Whither btrfsck?
Posted Oct 14, 2011 3:01 UTC (Fri) by zlynx (subscriber, #2285)
[Link]
That would fix a problem caused by a hardware error, but it wouldn't fix a disk structure problem caused by a logic bug in the btrfs driver itself.