Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* Problem mounting 4-drive RAID1 fs after replace was interrupted by kernel crash
@ 2026-03-31 20:39 Jaron Viëtor
  2026-03-31 21:13 ` Qu Wenruo
  0 siblings, 1 reply; 13+ messages in thread
From: Jaron Viëtor @ 2026-03-31 20:39 UTC (permalink / raw)
  To: linux-btrfs

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

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

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

end of thread, other threads:[~2026-04-07 11:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox