raid1_error(9)
π raid1_error π
ok so this is raid1_error, the RAID1 error handler, from the Kernel API Manual β yes bestie, we're reading kernel docs for fun now, this is who we are π
β¨ SYNOPSIS β¨
void raid1_error (struct mddev *mddev , struct md_rdev *rdev );
like, that's the whole vibe. void return, two args, no notes π
π«Ά ARGUMENTS π«Ά
mddevβ the affected md device. this is the one going through it rn πrdevβ the member device that needs to be failed. yeah. we're failing it. it's giving "you're cut from the group chat" energy.
π₯ DESCRIPTION π₯
okay so what this routine does is it acknowledges the rdev failure and then figures out the new mddev state. like it's the friend who calmly goes "okay. okay. here's what we're gonna do." π§
so if it failed, then:
- the
MD_BROKENflag gets set inmddev->flags. that's the big one, the main character flag π - recovery is disabled. no more healing arc, it's over π
otherwise β like, if it didn't fail β it must be degraded, and then:
- recovery gets interrupted. sorry girl, we're stopping mid-way π
mddev->degradedgets bumped. one more L on the counter π
and then rdev gets marked as Faulty β with one exception bestie, listen: that does not happen in the case where the array is failed and MD_FAILLAST_DEV is not set. iykyk, those are the exact conditions, don't come for me π«Ά
π¦ SEE ALSO π¦
Kernel file ./drivers/md/raid1.c β go read the source, it's literally right there, slay π
and that's the page!! this came from ./drivers/md, dated October 2026 β so yeah, future vibes, we stay ahead of the timeline β¨ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms