Re: cleanup after a small data loss on incorrect shutdown.

Chris Mason
2009-06-12T10:53:32Z

On Thu, Jun 11, 2009 at 04:44:30PM +0400, Michael Raskin wrote:
> Hello.
>
> I am continuing my tests of BtrFS under a practical workload. Recently
> an incorrect poweroff (or maybe a small bug in BtrFS) caused a small
> data loss. The actual damage was non-existent.
> I used old branch, so maybe the relevant code is already improved.
>
> 1. Why btrfsck says "bad block" on that partition? What does it mean?
> My fist reaction was to use badblocks. It found no badblocks in its own
> sense, so I assume btrfsck means something else. It would be nice to
> explain that to user. Maybe "damaged FS data block" ?

Yes, it would make sense to make these more informative.

>
> 2. I found a file which is listed in the directory, but stat on it
> returns "No such file or directory". Certainly, rm and unlink cannot
> remove it. The partition has 14G in use. What can I do to provide a
> useful piece of FS structure information? How can I remove the file
> afterwards.

I'd say to send us the btrfsck output, it will help answer these
questions.

>
> 3. On a 30G partition with 14G used btrfsck was left overnight. It has
> neither finished nor printed any meaningful request for interaction. Is
> it normal?

Definitely not ;) You can check with vmstat to see if btrfsck is
actually doing anything, but it sounds like you hit a bug. Which
version of the kernel and tools are you using?

-chris