All of lore.kernel.org
 help / color / mirror / Atom feed
* btrfs unmountable, any btrfs tool segfaults
@ 2014-08-23 16:39 Nikolay Shtabel
  2014-08-24  1:21 ` Duncan
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Shtabel @ 2014-08-23 16:39 UTC (permalink / raw)
  To: linux-btrfs

Hello,

I'm using archinux with btrfs as root filesystem, kernel 3.15.2, btrfs 3.14.2.

System was working fine for more than year, but suddenly
after large pacman update filesystem came to
unrecoverable error (remounted root ro).

I've decided to reboot, and after that btrfs failed to mount:

[ 1673.285020] BTRFS: bad tree block start 0 471748608
[ 1673.285071] BTRFS: bad tree block start 0 471748608
[ 1673.317384] BTRFS: open_ctree failed

When trying to mount with -o ro, recovery:

[ 1788.777081] BTRFS info (device sdc2): enabling auto recovery
[ 1788.777088] BTRFS info (device sdc2): disk space caching is enabled
[ 1788.778502] BTRFS: bad tree block start 0 471748608
[ 1788.778577] BTRFS: bad tree block start 0 471748608
[ 1788.778657] BTRFS: bad tree block start 0 471748608
[ 1788.778774] BTRFS: bad tree block start 0 471748608
[ 1788.778990] BTRFS: bad tree block start 0 260931584
[ 1788.779221] BTRFS: bad tree block start 0 260931584
[ 1788.779236] BTRFS: failed to read tree root on sdc2
[ 1788.779563] parent transid verify failed on 260562944 wanted 427348
found 427351
[ 1788.779907] parent transid verify failed on 260562944 wanted 427348
found 427351
[ 1788.779908] BTRFS: failed to read tree root on sdc2
[ 1788.780288] parent transid verify failed on 260358144 wanted 427347
found 427351
[ 1788.780571] parent transid verify failed on 260358144 wanted 427347
found 427351
[ 1788.780575] BTRFS: failed to read tree root on sdc2
[ 1788.844215] BTRFS: open_ctree failed

Then, i've tried to btrfs check:

Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
read block failed check_tree_block
Couldn't setup extent tree
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
read block failed check_tree_block
Couldn't setup csum tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Checking filesystem on /dev/sdc2
UUID: 9b5edd54-b3cb-4882-b8d5-ede68717e0aa
Critical roots corrupted, unable to fsck the FS
Segmentation fault
(btrfs[5049]: segfault at 1d3 ip 000000000042e35d sp 00007fff6b317870
error 4 in btrfs[400000+6b000])

As there are errors with csum and extent tree i've tried to reinit them also:

btrfs check --init-csum-tree:

Creating a new CRC tree
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
read block failed check_tree_block
Couldn't setup extent tree
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
read block failed check_tree_block
Couldn't setup csum tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Checking filesystem on /dev/sdc2
UUID: 9b5edd54-b3cb-4882-b8d5-ede68717e0aa
Reinit crc root
Unable to find block group for 0
btrfs: extent-tree.c:288: find_search_start: Assertion `!(1)' failed.
Aborted

btrfs check --init-extent-tree:

Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
read block failed check_tree_block
Couldn't setup extent tree
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
read block failed check_tree_block
Couldn't setup csum tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Checking filesystem on /dev/sdc2
UUID: 9b5edd54-b3cb-4882-b8d5-ede68717e0aa
Creating a new extent tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Error reading root block
error pinning down used bytes
Segmentation fault
([ 2816.659245] btrfs[5068]: segfault at 1d3 ip 000000000042e35d sp
00007fffc2052420 error 4 in btrfs[400000+6b000])

After all, the last step is to use btrfs restore:

btrfs restore -iv /dev/sdc2 /mnt/restore/
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
Check tree block failed, want=471748608, have=0
read block failed check_tree_block
Couldn't setup extent tree
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
Check tree block failed, want=468189184, have=0
read block failed check_tree_block
Couldn't setup csum tree
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
Check tree block failed, want=466935808, have=0
read block failed check_tree_block
Segmentation fault
[ 3324.252370] btrfs[32022]: segfault at fffffffffffffffb ip
000000000042a763 sp 00007fff14488690 error 5 in btrfs[400000+6b000]

I've tried this with latest btrfs-progs built from git.

Can you please suggest any method to restore files from filesystem?

Thanks!

Nikolay Shtabel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs unmountable, any btrfs tool segfaults
  2014-08-23 16:39 btrfs unmountable, any btrfs tool segfaults Nikolay Shtabel
@ 2014-08-24  1:21 ` Duncan
  2014-08-24  3:07   ` Marc MERLIN
  2014-08-24 15:48   ` Nikolay Shtabel
  0 siblings, 2 replies; 4+ messages in thread
From: Duncan @ 2014-08-24  1:21 UTC (permalink / raw)
  To: linux-btrfs

Nikolay Shtabel posted on Sat, 23 Aug 2014 16:39:48 +0000 as excerpted:

> After all, the last step is to use btrfs restore:
> 
> btrfs restore -iv /dev/sdc2 /mnt/restore/
> Check tree block failed, want=471748608, have=0
> Check tree block failed, want=471748608, have=0

> read block failed check_tree_block
> Couldn't setup extent tree

> read block failed check_tree_block
> Couldn't setup csum tree

> read block failed check_tree_block
> Segmentation fault [ 3324.252370]

> Can you please suggest any method to restore files from filesystem?

First answer (probably not too helpful, but gets the point across):

Since btrfs is still not fully stable and you are urged to keep backups 
if you value the data, then restore from them.  If you don't have them, 
by definition you obviously don't value the data enough to bother with 
the hassle of backing it up, so no big deal if you lose it, right?

Second answer (hopefully more helpful, but I'm obviously a bit grumpy 
today; I could put off answering until I'm not so grumpy, but I know what 
it's like to be waiting for an answer, so read thru the grumpy and we can 
both hope the solution works):

It used to be common courtesy to read a couple weeks of the the backgroup/
backlist before posting questions as they might be answered already.  I 
guess it isn't so these days...

Anyway, see the second half of the following post (the first half is a 
different problem and solution) dealing with using restore with btrfs-
find-root and etc, along with the wiki link mentioned (and of course the 
manpages as well).  With some luck you can still get btrfs restore 
working.  It worked for me recently (as you can see there, I had backups 
but they weren't as current as I would have liked).

http://permalink.gmane.org/gmane.comp.file-systems.btrfs/37980

-- 
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs unmountable, any btrfs tool segfaults
  2014-08-24  1:21 ` Duncan
@ 2014-08-24  3:07   ` Marc MERLIN
  2014-08-24 15:48   ` Nikolay Shtabel
  1 sibling, 0 replies; 4+ messages in thread
From: Marc MERLIN @ 2014-08-24  3:07 UTC (permalink / raw)
  To: Duncan; +Cc: linux-btrfs

On Sun, Aug 24, 2014 at 01:21:17AM +0000, Duncan wrote:
> It used to be common courtesy to read a couple weeks of the the backgroup/
> backlist before posting questions as they might be answered already.  I 
> guess it isn't so these days...

This is not scalable. There shouldn't be any recovery wisdom that is
only in the mailing list archive. This should be copied to the wiki.
I've been doing my part (and then some :), so have others ), so I urge
the rest to update the wiki with important information likely to be
useful to others later.
 
> Anyway, see the second half of the following post (the first half is a 
> different problem and solution) dealing with using restore with btrfs-
> find-root and etc, along with the wiki link mentioned (and of course the 
> manpages as well).  With some luck you can still get btrfs restore 
> working.  It worked for me recently (as you can see there, I had backups 
> but they weren't as current as I would have liked).
> 
> http://permalink.gmane.org/gmane.comp.file-systems.btrfs/37980

Please put this in the wiki :)

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/                         | PGP 1024R/763BE901

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs unmountable, any btrfs tool segfaults
  2014-08-24  1:21 ` Duncan
  2014-08-24  3:07   ` Marc MERLIN
@ 2014-08-24 15:48   ` Nikolay Shtabel
  1 sibling, 0 replies; 4+ messages in thread
From: Nikolay Shtabel @ 2014-08-24 15:48 UTC (permalink / raw)
  To: linux-btrfs

Thanks for the link, I'm glad to see that restore work for you.
I've tried this also and everything doesn't work ending up with segfault.

Unfortunately in my case I had some important files on btrfs
partition, due to performance reasons (it was on SSD).

I doesn't find solution in mailing-list archives, because there are
not so many cases in which tools refuses to work.

So, now I'm trying to debug btrfs tools, aiming first to get
btrfs-zero-log working.

>
> First answer (probably not too helpful, but gets the point across):
>
> Since btrfs is still not fully stable and you are urged to keep backups
> if you value the data, then restore from them.  If you don't have them,
> by definition you obviously don't value the data enough to bother with
> the hassle of backing it up, so no big deal if you lose it, right?
>
> Second answer (hopefully more helpful, but I'm obviously a bit grumpy
> today; I could put off answering until I'm not so grumpy, but I know what
> it's like to be waiting for an answer, so read thru the grumpy and we can
> both hope the solution works):
>
> It used to be common courtesy to read a couple weeks of the the backgroup/
> backlist before posting questions as they might be answered already.  I
> guess it isn't so these days...
>
> Anyway, see the second half of the following post (the first half is a
> different problem and solution) dealing with using restore with btrfs-
> find-root and etc, along with the wiki link mentioned (and of course the
> manpages as well).  With some luck you can still get btrfs restore
> working.  It worked for me recently (as you can see there, I had backups
> but they weren't as current as I would have liked).
>
> http://permalink.gmane.org/gmane.comp.file-systems.btrfs/37980
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-24 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-23 16:39 btrfs unmountable, any btrfs tool segfaults Nikolay Shtabel
2014-08-24  1:21 ` Duncan
2014-08-24  3:07   ` Marc MERLIN
2014-08-24 15:48   ` Nikolay Shtabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.