All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Anand Jain <anand.jain@oracle.com>,
	Tomasz Chmielewski <mangoo@wpkg.org>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: how to replace a failed drive?
Date: Thu, 2 Sep 2021 11:00:20 +0300	[thread overview]
Message-ID: <3d2ca50d-3f86-4b8d-ea42-2d7ca0135c52@gmail.com> (raw)
In-Reply-To: <70615a2e-bf3e-c56b-d536-48bd9cfdfb8c@oracle.com>

On 02.09.2021 10:45, Anand Jain wrote:
> On 02/09/2021 06:07, Tomasz Chmielewski wrote:
>> I'm trying to follow
>> https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Replacing_failed_devices
>> to replace a failed drive. But it seems to be written by a person who
>> never attempted to replace a failed drive in btrfs filesystem, and who
>> never used mdadm RAID (to see how good RAID experience should look like).
>>
>> What I have:
>>
>> - RAID-10 over 4 devices (/dev/sd[a-d]2)
>> - 1 disk (/dev/sdb2) crashed and was no longer seen by the operating
>> system
>> - it was replaced using hot-swapping - new drive registered itself as
>> /dev/sde
>> - I've partitioned /dev/sde, so that /dev/sde2 matches the size of
>> other btrfs devices
>> - because I couldn't remove the faulty device (it wouldn't go below my
>> current number of devices) I've added the new device to btrfs filesystem:
>>
> 
> 
>> btrfs device add /dev/sde2 /data/lxd
> 
>  Wiki is correct.
> 
>  $ btrfs replace start 7 /dev/sdf1 /mnt
> 

Where exactly user is supposed to find out the correct number of missing
device? Because
...

>>
>> # btrfs filesystem show /data/lxd
>> Label: 'lxd5'  uuid: 2b77b498-a644-430b-9dd9-2ad3d381448a
>>          Total devices 5 FS bytes used 2.84TiB
>>          devid    1 size 1.73TiB used 1.60TiB path /dev/sda2
>>          devid    3 size 1.73TiB used 1.60TiB path /dev/sdd2
>>          devid    4 size 1.73TiB used 1.60TiB path /dev/sdc2
>>          devid    6 size 1.73TiB used 0.00B path /dev/sde2
>>          *** Some devices missing
>>

It only shows existing devices. "Some devices missing" is not exactly
helping. More useful would be "devid 7 missing".

  reply	other threads:[~2021-09-02  8:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 22:07 how to replace a failed drive? Tomasz Chmielewski
2021-09-02  0:15 ` Remi Gauvin
2021-09-02  6:03 ` Nikolay Borisov
2021-09-02  6:16 ` Nikolay Borisov
2021-09-02  7:45 ` Anand Jain
2021-09-02  8:00   ` Andrei Borzenkov [this message]
2021-09-02  8:04     ` Nikolay Borisov
2021-09-02  9:23     ` Tomasz Chmielewski

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=3d2ca50d-3f86-4b8d-ea42-2d7ca0135c52@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mangoo@wpkg.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.