Thread (7 messages) 7 messages, 2 authors, 2013-09-14

"detect reshape on array start" (was Re: Weirdness with DDF arrays (mdadm 3.3))

From: Martin Wilck <hidden>
Date: 2013-09-14 21:01:31

Hi Neil,

I wrote:
quoted
quoted
Still testing MD arrays using DDF metadata and find another possible issues :)

I'm creating a new DDF array containing 2 disks. After that
/proc/mdstat looks correct:

# cat /proc/mdstat
Personalities : [raid1]
md124 : active raid1 loop0[1] loop1[0]
      84416 blocks super external:/md125/0 [2/2] [UU]

md125 : inactive loop1[1](S) loop0[0](S)
      65536 blocks super external:ddf

Now I'm stopping the array and restart it by incrementaly adding the 2 disks:
# mdadm --stop /dev/md124
# mdadm --stop /dev/md125
# mdadm -IRs /dev/loop0
This is wrong, because -IRs "wills can the mapfile for arrays that are
being incrementally assembled snd will try to start any that are not
already started".

mdadm -IRs will first add /dev/loop0, then see that there is an
incomplete array, and start it.
quoted
quoted
# mdadm -IRs /dev/loop1
Now you add /dev/loop1, but as the array is already started, it will be
added as a spare. That's what you see below.

However, there is room for improvement here. The array hasn't been
written to, so even if it is started, it should be possible to re-add
the second disk cleanly.
one major problem here seems to be commit 4867e068. It sets the array
dirty after transition from inactive to e.g. read-auto. That seems to be
wrong to me. From the patch's description

  Raid0: detect reshape on array start

  When raid0 array is takeovered to raid4 for reshape it should be
  possible to detect that array for reshape is monitored now for
  metadata update."

it seems that has been made for is a pretty special case (reshape of
RAID0 to RAID4, or would that affect other target geometries as well?)

For experimenting, I reverted the patch and ran some of the IMSM test
cases for reshape of RAID0 to something else, and they all still succeed.

So, I believe this patch can be reverted; and it should be because the
side effect that once a disk is missing when an array is started, it
can't be cleanly added any more, even if the array was never written to.

I cc'd Adam, the author of that patch, on this mail.

Martin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help