From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org, Samuel Greiner <samuel@balkonien.org>
Subject: Re: [PATCH 2/2] btrfs: add info when mount fails due to stale replace target
Date: Mon, 22 Aug 2022 21:36:45 +0200 [thread overview]
Message-ID: <20220822193645.GF13489@twin.jikos.cz> (raw)
In-Reply-To: <6a99394d3248034a908f8f1e22df8917c193446d.1660299977.git.anand.jain@oracle.com>
On Fri, Aug 12, 2022 at 06:32:19PM +0800, Anand Jain wrote:
> If the replace-target device re-appears after the suspended replace is
> cancelled, it blocks the mount operation as it can't find the matching
> replace-item in the metadata. As shown below,
>
> BTRFS error (device sda5): replace devid present without an active replace item
>
> To overcome this situation, the user can run the command
>
> btrfs device scan --forget <device-path-to-devid=0>
>
> and try the mount command again. And also, to avoid repeating the issue,
> superblock on the devid=0 must be wiped.
>
> wipefs -a device-path-to-devid=0.
>
> This patch adds some info when this situation occurs.
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> Reported-by: Samuel Greiner <samuel@balkonien.org>
> Link: https://lore.kernel.org/linux-btrfs/b4f62b10-b295-26ea-71f9-9a5c9299d42c@balkonien.org/T/
> ---
> fs/btrfs/dev-replace.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
> index 9d46a702bc11..7202b76ce59f 100644
> --- a/fs/btrfs/dev-replace.c
> +++ b/fs/btrfs/dev-replace.c
> @@ -166,6 +166,8 @@ int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info)
> if (btrfs_find_device(fs_info->fs_devices, &args)) {
> btrfs_err(fs_info,
> "replace devid present without an active replace item");
> + btrfs_info(fs_info,
> + "mount after the command 'btrfs deivce scan --forget <devpath-of-id-0>'");
The messages should be on the same level and in one message, I've
reprhrased it a bit.
next prev parent reply other threads:[~2022-08-22 19:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 10:32 [PATCH 0/2] fix issues during suspended replace operation Anand Jain
2022-08-12 10:32 ` [PATCH 1/2] btrfs: fix assert during replace-cancel of suspended replace-operation Anand Jain
2022-09-22 10:00 ` Filipe Manana
2022-09-22 11:28 ` Anand Jain
2022-08-12 10:32 ` [PATCH 2/2] btrfs: add info when mount fails due to stale replace target Anand Jain
2022-08-22 19:36 ` David Sterba [this message]
2022-08-22 19:36 ` [PATCH 0/2] fix issues during suspended replace operation David Sterba
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=20220822193645.GF13489@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=samuel@balkonien.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