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: lost with degraded RAID1
Date: Thu, 30 Jan 2014 03:28:26 +0000 (UTC)	[thread overview]
Message-ID: <pan$ef36e$b1a21cb6$c7661d0d$89c4aa14@cox.net> (raw)
In-Reply-To: CABgvyo-rw8To-=8_Kt+j8gXiJyX43oWPrWxhAGWqhpE83oCCAw@mail.gmail.com

Johan Kröckel posted on Wed, 29 Jan 2014 20:16:09 +0100 as excerpted:

[btrfs raid1 on a pair of luks-encrypted partitions, one went south and a 
balance back to single was started on the good one, interrupted by a 
reboot.]

> But now, I can't mount bunkerA degraded,RW because degraded filesystems
> are not allowed to be mounted RW (?).

AFAIK that shouldn't be the case.  Degraded should allow the RW mount -- 
I know it did some kernels ago when I tried it then, and if it changed, 
it's news to me too, in which case I need to do some reevaluation here.

What I think /might/ have happened is that there's some other damage to 
the filesystem unrelated to the missing device in the raid1, which forces 
it read-only as soon as btrfs finds that damage.  However, mount -o 
remount,rw,degraded should still work, I /think/.


> The consequence is,
> that I felt unable to do anything other than mounting it RO and back it
> up (all data is fine) to another filesystem. I don't have a new
> substitute disk, yet, so I couldn't test whether I can add a new device
> to a RO-mounted filesystem. Adding a loop device didn't work.

Well, given that btrfs isn't yet entirely stable, and both mkfs.btrfs and 
the btrfs wiki at btrfs.wiki.kernel.org warn to keep tested backups in 
case something goes wrong with the btrfs your testing and you lose that 
copy... you should have already had that backup, and wouldn't need to 
make it, only perhaps update a few files that changed since your last 
backup that you were willing to lose the changes too if it came to it, 
but since you can still mount ro, you might as well take the chance to 
update the backup given that you can.

> What are my options now? What further information could be useful? I
> cant believe, that I have all my data in front of me and have to start
> over again with a new filesystem because of security checks and no
> enforcement option to mount it RW.

As I said, to the best of my (non-dev btrfs user and list regular) 
knowledge, mount -o degraded,rw should work.  If it's not, there's likely 
something else going on triggering the ro remount, and seeing any related 
dmesg output would presumably help.

One other thing that might help is the skip_balance mount option, to 
avoid restarting the in-process balance immediately.  See if that lets 
you mount degraded,rw without immediately forcing back to ro.  You can 
then try resuming the balance.  If that fails, try canceling the balance 
and then starting a new balance using balance filters (see the balance 
questions in the FAQ on the wiki, which link to the balance-filters page).

Meanwhile, at least you have ro access to all the data and can take that 
backup that you apparently ignored the warnings about making, previously.

-- 
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:[~2014-01-30  3:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 19:16 lost with degraded RAID1 Johan Kröckel
2014-01-30  3:28 ` Duncan [this message]
2014-01-30 11:53 ` Johan Kröckel
2014-01-30 17:57   ` Chris Murphy
     [not found]     ` <CABgvyo9FYGSYpj+jL1oqCvtNUqsC8HZ+z=x-Gz7naWoEcCKWpQ@mail.gmail.com>
2014-01-30 19:32       ` Chris Murphy
2014-01-30 22:18   ` Duncan
2014-01-31  3:00     ` Chris Murphy
2014-01-31  5:58       ` Duncan
2014-01-31  6:10         ` Chris Murphy
2014-01-31  6:13           ` Chris Murphy
2014-01-31  7:37             ` Duncan
2014-01-31  2:19   ` Chris Murphy
2014-01-30 17:33 ` Chris Murphy
2014-01-30 17:58   ` Hugo Mills
2014-01-30 18:25     ` Chris Murphy
2014-02-03 20:55       ` Johan Kröckel
2014-02-03 21:08         ` Chris Murphy
2014-02-03 21:31           ` Johan Kröckel
2014-02-07 11:34             ` Johan Kröckel
2014-02-07 17:43               ` Chris Murphy
2014-02-08 11:09                 ` Johan Kröckel
2014-02-09  5:40                   ` Duncan
2014-02-10 14:05                     ` Johan Kröckel
     [not found]   ` <CABgvyo822bOAHeA1GH28MPaBAU+Zdi72MD_uwL+dhopt+nwMig@mail.gmail.com>
2014-01-31  6:28     ` Fwd: " Johan Kröckel
2014-01-31  6:40 ` Johan Kröckel

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$ef36e$b1a21cb6$c7661d0d$89c4aa14@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).