From: Qu Wenruo <wqu@suse.com>
To: "Jaron Viëtor" <jaron@vietors.com>, linux-btrfs@vger.kernel.org
Subject: Re: Problem mounting 4-drive RAID1 fs after replace was interrupted by kernel crash
Date: Wed, 1 Apr 2026 07:43:57 +1030 [thread overview]
Message-ID: <2aa4a94b-1f10-4b17-a78a-2a58efb56522@suse.com> (raw)
In-Reply-To: <CAF1bhLVYLZvD=j2XyuxXDKD-NWNJAwDnpVN+UYeQW-HbzNRn1A@mail.gmail.com>
在 2026/4/1 07:09, Jaron Viëtor 写道:
> Hello,
>
> I have a machine with a 4-drive RAID1 btrfs filesystem attached to it
> over a USB3-to-SATA bridge. They are not connected directly over SATA
> because it's an Intel NUC, so USB3 is pretty much the only sensible
> option.
> A few days ago, one of the drives started failing so I connected a
> second USB-TO-SATA bridge (the first one could only hold 4 drives),
> inserted a new drive into the new bridge, and ran:
>
> btrfs replace start -r 7 /dev/sdk1 /media
>
> Devid 7 was the failing drive, and sdk1 is the new (larger) replacement.
> This all went fine so far, and the replace was happily chugging along
> for several hours.
> Unfortunately, at around 7.1% done a kernel crash happened (I believe
> it was unrelated to the replace operation, but can't be sure -
> unfortunately I didn't save the errors it printed) and I had to reboot
> the machine.
>
> After the reboot, attempting to mount the filesystem gives these messages:
>
> BTRFS info (device sdk1): first mount of filesystem
> d18c93f8-d80a-4aa7-adc5-86d457ddde20
> BTRFS info (device sdk1): using crc32c (crc32c-lib) checksum algorithm
> BTRFS error (device sdk1): devid 0 path /dev/sdk1 is registered but
> not found in chunk tree
> BTRFS error (device sdk1): remove the above devices or use 'btrfs
> device scan --forget <dev>' to unregister them before mount
> BTRFS error (device sdk1): open_ctree failed: -117
>
> Either running that command and/or unplugging the new replacement
> drive, instead gives me these (either action results in the same
> messages):
Kernel version please.
And with all devices (including the new and failing disks), and "btrfs
dev scan", the mount still fails with the same message?
If so, mount with "degraded" mount option, and try to cancel the
replacement, then try again.
Thanks,
Qu
>
> BTRFS info (device sdg1): first mount of filesystem
> d18c93f8-d80a-4aa7-adc5-86d457ddde20
> BTRFS info (device sdg1): using crc32c (crc32c-lib) checksum algorithm
> BTRFS info (device sdg1): bdev /dev/sdg1 errs: wr 0, rd 16, flush 0,
> corrupt 1054, gen 0
> BTRFS info (device sdg1): bdev /dev/sdh1 errs: wr 0, rd 0, flush 0,
> corrupt 379, gen 0
> BTRFS info (device sdg1): bdev /dev/sdi1 errs: wr 0, rd 0, flush 0,
> corrupt 1652, gen 0
> BTRFS info (device sdg1): bdev /dev/sdj1 errs: wr 0, rd 0, flush 0,
> corrupt 1522, gen 0
> BTRFS warning (device sdg1): cannot mount because device replace
> operation is ongoing and
> BTRFS warning (device sdg1): tgtdev (devid 0) is missing, need to run
> 'btrfs dev scan'?
> BTRFS error (device sdg1): failed to init dev_replace: -5
> BTRFS error (device sdg1): open_ctree failed: -5
>
> So... it seems to be stuck thinking the new drive both should -and-
> shouldn't be there. Huh.
>
> I already asked for help with this issue in the IRC channel, but the
> friendly folks there told me after some debugging that this was a
> problem for the mailing list. So... here I am!
> I do have access to other machines I could potentially connect the
> drives directly to... but I'm not inclined to think the USB-to-SATA
> bridge(s) is/are the problem here. (Unless somebody here says
> otherwise, of course.)
>
> Thanks in advance for any help you may be able to provide!
>
> Kind regards,
> Jaron Viëtor
>
next prev parent reply other threads:[~2026-03-31 21:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 20:39 Problem mounting 4-drive RAID1 fs after replace was interrupted by kernel crash Jaron Viëtor
2026-03-31 21:13 ` Qu Wenruo [this message]
2026-03-31 21:23 ` Jaron Viëtor
2026-03-31 21:31 ` Qu Wenruo
2026-03-31 21:54 ` Jaron Viëtor
2026-03-31 21:58 ` Qu Wenruo
2026-03-31 22:01 ` Jaron Viëtor
2026-03-31 22:07 ` Qu Wenruo
2026-03-31 22:11 ` Jaron Viëtor
2026-03-31 22:33 ` Qu Wenruo
2026-03-31 22:47 ` Jaron Viëtor
2026-04-07 5:41 ` Qu Wenruo
2026-04-07 11:31 ` Jaron Viëtor
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=2aa4a94b-1f10-4b17-a78a-2a58efb56522@suse.com \
--to=wqu@suse.com \
--cc=jaron@vietors.com \
--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