Re: BTRFS disaster (of my own making). Is this recoverable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 5, 2015 at 6:31 AM, Sonic <sonicsmith@xxxxxxxxx> wrote:
> On Tue, Aug 4, 2015 at 4:23 PM, Sonic <sonicsmith@xxxxxxxxx> wrote:
>> Seems that if there was someway to edit something in those first
>> overwritten 32MB of disc 2 to say "hey, I'm really here, just a bit
>> screwed up" maybe some of the recovery tools could actually work.
>
> Just want to reiterate this thought.
>
> The basic error in most cases with the tools at hand is that Disc 2 is
> missing so there's little the tools can do. Somewhere in those first
> 32MB should be something to properly identify the disc as part of the
> array.

Yes but it was probably  uniquely only on that disk, because there's
no redundancy for metadata or system chunks. Therefore there's no copy
on the other disk to use as a model. The btrfs check command has an
option to use other superblocks, so you could try that switch and see
if it makes a difference but it sounds like it's finding backup
superblocks automatically. That's the one thing that is pretty much
always duplicated on the same disk; for sure the first superblock is
munged and would need repair. But there's still other chunks
missing... so I don't think it'll help.


>
> If the btrfs tools can't fix it maybe dd can. Is there anything can be
> gained from the beginning of disc 1 (can dd this to a file) in order
> to create the necessary bits needed at the beginning of disc2?

Not if there's no metadata or system redundancy profile like raid1.

> Or some
> other way to overwrite the beginning of disc 2 (using dd again) with
> some identification information so that the automated btrfs tools can
> take it from there?

I think to have a viable reference, you need two disks (virtual or
real) and you need to exactly replicate how you got to this two disk
setup to find out what's in those 32MB that might get the file system
to mount even if it complaints of some corrupt files. That's work
that's way beyond my skill level. The tools don't do this right now as
far as I'm aware. You'd be making byte by byte insertions to multiple
sectors. Tedious. But I can't even guess how many steps it is. It
might be 10. It might be 10000.


-- 
Chris Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux