mdrecoveryd oops
Hi, it's me again.
I also wanted to ask if it is supported to use md array during recovery? (with some journaling fs on it). When a system fails I have to wait for about 1 hour while recovery finishes before i mount fs on md, or else it crashes. I tried many kernel versions from 2.4.16 to 2.4.19-pre8, with the same result.
Thanks,
VanTo
Quoted 5 lines · VanTo
I also wanted to ask if it is supported to use md array during recovery? (with some journaling fs on it). When a system fails I have to wait for about 1 hour while recovery finishes before i mount fs on md, or else it crashes. I tried many kernel versions from 2.4.16 to 2.4.19-pre8, with the same result.
It *should* work. Are you using this on a SMP machine? There are some race situations causing crashes, but it should work with an UP machine.
Here is a patch produced by [email protected] that should help in SMP machine. It not pretty and it's not '100% right', but it seems to work.
D.
drivers/md/md.c +17 -0
@@ -468,6 +468,19 @@ } } +static inline int mark_rdev_faulty (mdk_rdev_t * rdev) +{ +if (!rdev) { +MD_BUG (); +return 0 ; + } +if (rdev->faulty) +return 0 ; +free_disk_sb (rdev); + rdev->faulty =1 ; +return 1 ; +} +static int read_disk_sb (mdk_rdev_t * rdev) {int ret = -EINVAL ;
@@ -3048,10 +3061,14 @@ rrdev =find_rdev (mddev, rdev);if (!rrdev || rrdev->faulty)return 0 ; +if (!mark_rdev_faulty (rrdev)) +return 0 ;if (!mddev->pers->error_handler || mddev->pers->error_handler (mddev,rdev) <=0 ) { +/* free_disk_sb(rrdev); rrdev->faulty = 1; +*/ }else return 1 ;/*
Quoted 3 lines · Danilo Godec
It *should* work. Are you using this on a SMP machine? There are some race situations causing crashes, but it should work with an UP machine.
It's an UP machine. I was asking this question because we had raid0 and it was OK. Now with raid5, machine dies after about 5-6 days. Usually kswapd oopses in some raid5 routine while manipulating with stripe list.
Quoted 4 lines
Here is a patch produced by [email protected] that should help in SMP machine. It not pretty and it's not '100% right', but it seems to work.
D.