Skip to contentSkip to conversation

High-sensitivity fs checker (not repairer) for btrfs

DISCUSSION Bob Marley 3 participants 4 messages Nov 10, 2012 – Nov 11, 2012 Btrfs file system

lore
Share & tools
lore

Bob Marley

author
#0 lore raw

Hello all
I would like to know if there exists a tool to check the btrfs filesystem very thoroughly.
It's ok if it needs the FS unmounted to operate. Also mounted is OK.
It does not need repair capability
It needs very good checking capability: it has to return Good / Bad status with the "Bad" meaning that there is at least ONE inconsistency. Good means that it is really really 100% consistent.

Does something like this exists?

We need to detect as much ahead of time as possible if the btrfs filesystem has become even just a little bit inconsistent

Thank you

#1 lore raw
Quoted 9 lines · Bob Marley

Hello all
I would like to know if there exists a tool to check the btrfs filesystem very thoroughly.
It's ok if it needs the FS unmounted to operate. Also mounted is OK. It does not need repair capability
It needs very good checking capability: it has to return Good / Bad status with the "Bad" meaning that there is at least ONE inconsistency. Good means that it is really really 100% consistent.

Quoted 4 lines

Does something like this exists?

We need to detect as much ahead of time as possible if the btrfs filesystem has become even just a little bit inconsistent

The closest thing is btrfsck. That's about as picky as we've got to
date.

What exactly is your use-case for this requirement?

Hugo.

Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
         --- 2 + 2 = 5,  for sufficiently large values of 2. ---         
author
#2 lore raw
Quoted 4 lines · Hugo Mills

The closest thing is btrfsck. That's about as picky as we've got to
date.

What exactly is your use-case for this requirement?

We need a decently-available system. We can rollback filesystem to last-known-good if the "test" detects an inconsistency on current btrfs filesystem, but we need a very good test for that (i.e. if last-known-good is actually bad we get into serious troubles).

So do you think btrfsck can return a false "OK" result? can it "not-see" an inconsistency?

Thank you

#3 lore raw
Quoted 5 lines · Bob Marley
Quoted 4 lines · Hugo Mills

The closest thing is btrfsck. That's about as picky as we've got to
date.

Quoted 7 lines
Quoted 1 line

What exactly is your use-case for this requirement?

We need a decently-available system. We can rollback filesystem to last-known-good if the "test" detects an inconsistency on current btrfs filesystem, but we need a very good test for that (i.e. if last-known-good is actually bad we get into serious troubles).

Scrub is probably more useful as a check, combined with "does the filesystem actually mount".

Quoted 2 lines

So do you think btrfsck can return a false "OK" result? can it "not-see" an inconsistency?

No set of checks will ever be perfect, so yes.