All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Deragon <hans@deragon.biz>
To: linux-btrfs@vger.kernel.org
Subject: raid1:  cannot add disk to replace faulty because can only mount fs as read-only.
Date: Tue, 24 Jan 2017 13:57:24 -0500	[thread overview]
Message-ID: <54678ac94c95687e00485d41fa5b5bc9@server1.deragon.biz> (raw)

Greetings,


Warning: Btrfs user here; no knowledge of the inside working of btrfs. 
If I am in the wrong mailing list, please redirect me and accept my 
apologies.

At home, lacking of disks and free SATA ports, I created a raid1 btrfs 
filesystem by converting an existing single btrfs instance into a 
degraded raid1, then added the other driver. The exact commands I used 
have been lost.

Worked well, until one of my drive died. Total death; the OS does not 
detect it anymore. I bought another drive, but alas, I cannot add it:

# btrfs replace start -B 2 /dev/sdd /mnt/brtfs-raid1-b
ERROR: ioctl(DEV_REPLACE_START) failed on "/mnt/brtfs-raid1-b": 
Read-only file system

Here is the command I used to mount it:

mount -t btrfs -o ro,degraded,recovery,nosuid,nodev,nofail,x-gvfs-show 
/dev/disk/by-uuid/975bdbb3-9a9c-4a72-ad67-6cda545fda5e 
/mnt/brtfs-raid1-b

If I remove 'ro' from the option, I cannot get the filesystem mounted 
because of the following error:

BTRFS: missing devices(1) exceeds the limit(0), writeable mount is not 
allowed

So I am stuck. I can only mount the filesystem as read-only, which 
prevents me to add a disk.

It seams related to bug: 
https://bugzilla.kernel.org/show_bug.cgi?id=60594

I am using Ubuntu 16.04 LTS with kernel 4.4.0-59-generic. Is there any 
hope to add a disk? Else, can I recreate a raid1 with only one disk and 
add another, but never suffer from the same problem again? I did not 
lost any data, but I do have some serious downtime because of this. I 
wish that if a drive fail, the btrfs filesystem still mounts rw and 
leave the OS running, but warns the user of a failing disk and easily 
allow the addition of a new drive to reintroduce redundancy. However, 
this scenarios seams impossible with the current state of affair. Am I 
right?


Best regards and thank you for your contribution to the open source 
movement,
Hans Deragon

             reply	other threads:[~2017-01-24 19:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 18:57 Hans Deragon [this message]
2017-01-24 19:48 ` raid1: cannot add disk to replace faulty because can only mount fs as read-only Adam Borowski
     [not found] ` <W75Sc6PDCBok7W75TcCgc7@videotron.ca>
2017-01-27 16:47   ` Hans Deragon
2017-01-27 20:03     ` Austin S. Hemmelgarn
2017-01-27 20:28       ` Adam Borowski
2017-01-28  9:17       ` Andrei Borzenkov
2017-01-30 12:18         ` Austin S. Hemmelgarn
     [not found]         ` <YAvBcoM9EImXYYAvCcegSf@videotron.ca>
2017-02-01  2:51           ` Hans Deragon
2017-02-01  5:23             ` Duncan
2017-02-01 11:55               ` Adam Borowski
2017-02-01 22:48                 ` Duncan
2017-02-02 12:49                   ` Austin S. Hemmelgarn
2017-02-02 14:25                     ` Adam Borowski
2017-02-02 15:06                       ` Austin S. Hemmelgarn
     [not found]                       ` <ZIyPcL4cW36fIZIyQcB9Hs@videotron.ca>
2017-02-08  3:21                         ` Hans Deragon
2017-02-08 12:50                           ` Austin S. Hemmelgarn
2017-02-08 13:46                             ` Tomasz Torcz
2017-02-08 19:06                               ` Austin S. Hemmelgarn
2017-02-03  9:35                     ` 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=54678ac94c95687e00485d41fa5b5bc9@server1.deragon.biz \
    --to=hans@deragon.biz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.