linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* raid1:  cannot add disk to replace faulty because can only mount fs as read-only.
@ 2017-01-24 18:57 Hans Deragon
  2017-01-24 19:48 ` Adam Borowski
       [not found] ` <W75Sc6PDCBok7W75TcCgc7@videotron.ca>
  0 siblings, 2 replies; 19+ messages in thread
From: Hans Deragon @ 2017-01-24 18:57 UTC (permalink / raw)
  To: linux-btrfs

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2017-02-08 19:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24 18:57 raid1: cannot add disk to replace faulty because can only mount fs as read-only Hans Deragon
2017-01-24 19:48 ` 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

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