Bug 1093912 - btrfsck unusable
Summary: btrfsck unusable
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: btrfs-progs
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josef Bacik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-03 08:50 UTC by Karel Volný
Modified: 2014-05-04 00:43 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-04 00:43:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
screenshot of the hang (2.00 MB, image/jpeg)
2014-05-03 08:50 UTC, Karel Volný
no flags Details

Description Karel Volný 2014-05-03 08:50:11 UTC
Created attachment 892076 [details]
screenshot of the hang

Description of problem:
I'm not sure how to make this report usable as I cannot attach the filesystem image that reproduces the problem, but I'll try anyways ...

The first issue is that btrfsck refuses to work on mounted (albeit readonly) filesystem so I had to boot from CD. I believe there must be a bug for this already but I cannot find it, could someone give me a reference so I can add myself on CC?

The second issue is that it fails to repair the filesystem when run with '--repair' and it gives no clue about that (well except the nonzero exit code but who checks them manually?)

And the third is that after using those '--init-*' options, it just hangs - probably already seen as bug #972565.

Version-Release number of selected component (if applicable):
the one that is on Fedora 20 x86_64 netinstall CD

How reproducible:
(tried once)

Steps to Reproduce:
0. use you system extensively, maybe help it with some hard resets, so that btrfs becomes broken
1. boot into rescue from install media
2. do not let it mount (see aso bug #1093909)
3. if needed (my case) do some cryptsetup magic
4. btrfsck --repair --init-csum-tree --init-extent-tree /dev/mapper/yourdisk

Actual results:
hang, endless loop

Expected results:
filesystem gets repaired, you can reboot into your normal system happily

Additional info:
see the screenshot ...

Comment 1 Eric Sandeen 2014-05-04 00:43:13 UTC
Yes, unfortunately btrfsck is extremely immature.  It's unfortunate that there's no robust tool an admin can use to recover a broken btrfs filesystem.

There is a new btrfs-progs release in testing, which may or may not behave better, but I understand that you can't easily use that on your root filesystem, since you need it on a rescue image.

To be quite honest, this isn't something Fedora packagers or maintainers can fix.  It's an upstream issue; a mature btrfsck has been extremely long in coming, and by all indications will be something you'll continue to wait for.

I'd suggest finding a way to use the newer upstream btrfsck on your image, and if that fails, report it the problem upstream.

Sorry,
-Eric


Note You need to log in before you can comment on or make changes to this bug.