lkml.org 
[lkml]   [2009]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: raid6 grow "hangs" on 2.6.27 with mounted FS
Neil Brown wrote:
> On Saturday March 21, roma1390@gmail.com wrote:
> I can almost reproduce this.
> However when I run it, the "mdadm --grow" prints mdadm: Need to
backup 384K of critical section..
> (as expected) and then hangs.
>
> If I interrupt it and proceed, then the umount hangs.
>
> Is this the case for you?

Yes, mdadm hangs by itself, If i start mdadm in background and wait some
time for reconstrucion, umount still hangs. I didn't touch mdadm, and
mdadm likes to stop...

> The umount hangs because there is something important that mdadm needs
> to do which it didn't do because it was interrupted. During the
> 'critical section', mdadm causes all writes to the start of the device
> to be blocked. The umount tries to write the filesystem superblock
> and hangs.
> You can test if this is the problem by running the command
>
> cat /sys/block/md2/md/suspend_hi > /sys/block/md2/md/suspend_lo

First try was:

mdadm --grow /dev/md2 --raid-devices=5 &
sleep 3
cat /sys/block/md2/md/suspend_hi
# output: 768
cat /sys/block/md2/md/suspend_lo
# output: 0
cat /sys/block/md2/md/suspend_hi > /sys/block/md2/md/suspend_lo
sleep 20
umount /dev/md2

And this works! mdadm unhangs, and umount doesn't block any more.

> That should allow the 'umount' to complete.
>
> This will only happen on very small arrays that take less than a
> couple of seconds for the reshape to complete. I have a patch for
> mdadm which makes it more robust in this situation. It will be in
> future releases.
>
> Does this explain what is happening to you?

Yes, thanks. May be if I retest this situation with same kernel and
limited recovery bandwith, then may be i can't hit same problem again?

> Thanks,
> NeilBrown

Thanks.




\
 
 \ /
  Last update: 2009-03-23 09:45    [W:0.304 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site