linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: seeking advice
Date: Tue, 26 Jun 2012 03:24:51 +0000 (UTC)	[thread overview]
Message-ID: <pan.2012.06.26.03.24.52@cox.net> (raw)
In-Reply-To: CAJ8bbvtN_8vY3x0LzNFC7kBChSvRruaaes+Oi2oUE6BmSob+LQ@mail.gmail.com

Maciej Sujkowski posted on Mon, 25 Jun 2012 19:43:36 +0100 as excerpted:

> Maybe someone will be able to help.
> 
> I have 2 unusable instances of btrfs.
> 
> 1. when I did a re-size (stretch) I had a power lost and now btrfs
> system is not detected on the drive (tried find-root, restore, btrfsck,
> btrfs show and maybe something else - can't remember as it was some time
> ago

As both the btrfs wiki ( https://btrfs.wiki.kernel.org/ ) and kernel 
config btrfs option have strong warnings about btrfs still being an 
experimental filesystem only appropriate for testing, and a good admin 
always has backups in any case but will DEFINITELY have backups (tested, 
since by definition, an untested backup isn't a completed backup) when 
testing an experimental filesystem such as btrfs is at this point, this 
one shouldn't be a problem.  Simply wipe that btrfs image and restore 
from those backups.

And of course, admins will also know that if they value their data, they 
make backups before resizing as well, even if they're normally careless 
with it.

It's also worth noting, since you mentioned that it was some time ago, 
that the btrfsck --repair option is fairly new.  It's possible it didn't 
even have a --repair option back when you tried it before, and that might 
fix it.  Of course, being new and even /more/ experimental than the 
filesystem in general, it could also make the problem worse, as seems to 
have been the case below, but if your alternative is restoring from 
backup anyway, it doesn't hurt to try.

(Ordinarily, testers should be running quite new kernels and utilities as 
well, and it might be worth working with the devs to check their restore 
operations, etc.  But as you said this was some time ago, I'm assuming 
the kernel is now old enough, with enough of its bugs now fixed, that the 
value of doing that is rather low now, as the code that created the 
problem is simply too stale.)

Alternatively, if you're using one of the distros that has chosen to 
support btrfs despite its experimental state upstream, you'd need to 
arrange with them to take them up on that support offer...

> 2. I did btrfsck -repair on another device and now it show incorrect
> amount of space (the difference is really huge) and when i try to mount
> it there is kernel bug. btrfsck detects some errors but can't fix it.


See the wiki on this one.  In particular, there's a mount option that you 
can try (nospace-cache, IIRC, but double-check), so check the info on 
mount options.

I'm off of btrfs now as I decided it's still not stable enough for me, 
but was testing it during the kernel 3.4 development cycle, and had a 
space-cache problem after I enabled it and had a crash.  The filesystem 
refused to mount after that just as yours is.  One-shot mount-disabling 
the space-cache allowed the filesystem to mount and repair itself in the 
process, after which mounting it normally (so space-cache auto-activated 
once again) worked fine.

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


      reply	other threads:[~2012-06-26  3:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJ8bbvtJG_=grkgdJ_Bk68QHt0eE5DghHwZNTeEGhd_PBof=sw@mail.gmail.com>
2012-06-25 18:43 ` seeking advice Maciej Sujkowski
2012-06-26  3:24   ` Duncan [this message]

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=pan.2012.06.26.03.24.52@cox.net \
    --to=1i5t5.duncan@cox.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).