linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: cwillu <cwillu@cwillu.com>
To: Adam Ryczkowski <adam.ryczkowski@statystyka.net>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: BTRFS corrupted by combination of mistreatment of hiberantion and accidental power loss.
Date: Wed, 29 Jan 2014 09:13:44 -0600	[thread overview]
Message-ID: <CAE5mzvhEMKBkJCzeB-NAAgdGjzidh9adkxF-ytW5K_vNZcxJOA@mail.gmail.com> (raw)
In-Reply-To: <52E91535.8090306@statystyka.net>

You'd have been better off to just throw away the hiberated image:
mounting the filesystem would look like any other recovery from a
crash, and would have replayed the log and committed a new
transaction, in addition to whatever other disk writes happened due to
boot logs and so forth.

In this case, I suspect you'd have been perfectly fine.

When resuming the hibernated image at that point however, the kernel
will have its own ideas about the state on disk (i.e., whatever state
it had in memory), partially undoing a subset of the changes from the
previous boot and generally making a mess of things.

That said, have you tried mounting with -o recovery yet?  I wouldn't
be surprised if btrfs-restore was also able to retrieve most of
everything.  Either way, I'd be suspicious of the filesystem, and
would look to restore from backup to a fresh fs.



On Wed, Jan 29, 2014 at 8:50 AM, Adam Ryczkowski
<adam.ryczkowski@statystyka.net> wrote:
> I have two independent Linux installations my notebook, both sharing the
> same btrfs partition as root file system, but installed on different
> subvolumes.
>
> I hibernated one Linux (Mint 15 64 bit). Hibernation data is stored on the
> swap file, which is used exclusively by this system.
>
> Then 2 events happened.
>
> 1) I accidentally ran the other system, which wasn't hibernated - Ubuntu
> 12.10. Realizing the problem, I waited until the system booted up, and then
> shutdowned it.
>
> Then I opened the hibernated Mint 15. Restoration went successful, and I
> never thought I am in trouble.
>
> 2) Immediately after that, by coincidence, the battery fell down, brutally
> powering down the computer.
>
> After that, I am unable to repair/mount the root btrfs partition, however I
> try (I built the current btrfs-tools from git). Dmesg displays only one
> error entry: btrfs: open_ctree failed.
>
> I know, that if one those two events happened separately, there would be no
> problem. The problem arose only when those two events happened
> simultaneously.
>
> So I guess I am experiencing one of the corner cases.
>
> What are my prospects to restoring my data? I have several subvolumes on the
> hard drive, some of them were not touched by the accident at all.
>
> Adam Ryczkowski
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-01-29 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 14:50 BTRFS corrupted by combination of mistreatment of hiberantion and accidental power loss Adam Ryczkowski
2014-01-29 15:02 ` Roman Mamedov
2014-01-29 15:13 ` cwillu [this message]
2014-01-29 17:08   ` Duncan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAE5mzvhEMKBkJCzeB-NAAgdGjzidh9adkxF-ytW5K_vNZcxJOA@mail.gmail.com \
    --to=cwillu@cwillu.com \
    --cc=adam.ryczkowski@statystyka.net \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).