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: mount hangs after disk crash (RAID-1)
Date: Thu, 22 May 2014 09:43:40 +0000 (UTC)	[thread overview]
Message-ID: <pan$4965$e2755b8c$eb8c082f$e15db32d@cox.net> (raw)
In-Reply-To: 20140522032258.234aaab7@s9

Tomasz Chmielewski posted on Thu, 22 May 2014 03:22:58 +0100 as excerpted:

> One disk in RAID-1 crashed, so powered off, changed disk, powered on,
> trying to mount degraded.
> 
> Unfortunately it hangs (running 3.14.4).
> 
> # mount -o degraded,compress=lzo,noatime /dev/sdb4 /home (...never
> returns...)

1) Just to be sure, btrfs raid1, not btrfs on md/raid1 or the like, 
correct?

2) Btrfs raid1 for both data and metadata, correct?

3) How many devices in the btrfs raid1?

4) Did you try mounting read-only?

Note that unlike md/raid1, btrfs raid1 won't mount writable with only a 
single device.  You must have at least two devices to mount writable, tho 
a formerly two-device raid1 with a device missing should mount read-only.

However, ordinarily you can't add a device to a filesystem unless it's 
mounted writable, and if it won't go writable as you have only the one 
device, so you can't add another device...  I'm actually not sure how 
that's supposed to work, as the requiring two devices to mount writable 
bit is fairly new.

In the worst case, however, you could create a new single-device 
filesystem with the new device and mount it, mount the old one read-only 
and copy everything over, then unmount the old one and add it to the new 
one, then do a balance-convert to raid1 mode again.  That's actually how 
I've been planning to handle it if I lose a device from my paired-device 
btrfs raid1 and it goes read-only, so I can't add the replacement 
device.  Seems there should be an easier way, but...

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


  parent reply	other threads:[~2014-05-22  9:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22  2:22 mount hangs after disk crash (RAID-1) Tomasz Chmielewski
2014-05-22  8:51 ` Tomasz Chmielewski
2014-05-22 15:16   ` Tomasz Chmielewski
2014-05-22 17:50     ` Tomasz Chmielewski
2014-05-22 18:20       ` Chris Murphy
2014-05-22 21:06       ` Duncan
2014-05-22 22:07       ` Chris Murphy
2014-05-22  9:43 ` Duncan [this message]
2014-05-22 16:27   ` Chris Murphy

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$4965$e2755b8c$eb8c082f$e15db32d@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).