linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm 3.3 fails to kick out non fresh disk
@ 2013-09-13 13:22 Francis Moreau
  2013-09-13 20:43 ` NeilBrown
  0 siblings, 1 reply; 25+ messages in thread
From: Francis Moreau @ 2013-09-13 13:22 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid

Hi Neil,

I'm probably doing something wrong since it's a pretty critical bug
but can't see what.

I'm creating a RAID1 array with 1.2 metadata. After that I stop the
array, and restart the array with only one disk. I write random data
on the array and then stop it again:

# mkfs.ext4 /dev/md125
# mdadm --stop /dev/md125
# mdadm -IRs /dev/loop0
# mount /dev/md125 /mnt/
# date >/mnt/foo
# umount /mnt
# mdadm --stop /dev/md125

Finally I restart the array with the 2 disks (one disk is outdated)
and mdadm happily activates the array without error. Note that I add
the outdated disk first in that case:

# mdadm -IRs /dev/loop1
mdadm: /dev/loop1 attached to /dev/md/array1, which has been started.
# mdadm -IRs /dev/loop0
mdadm: /dev/loop0 attached to /dev/md/array1 which is already active.
# cat /proc/mdstat
Personalities : [raid1]
md125 : active raid1 loop0[0] loop1[1]
      117056 blocks super 1.2 [2/2] [UU]
# mount /dev/md125 /mnt
# ls /mnt/
[  457.321771] EXT4-fs error (device md125): ext4_lookup:1047: inode
#2: comm ls: deleted inode referenced: 12
ls: cannot access /mnt/1: Input/output error

If I add the outdated disk last I got this:
# mdadm -IRs /dev/loop0
mdadm: /dev/loop0 attached to /dev/md/array1, which has been started.
# mdadm -IRs /dev/loop1
mdadm: can only add /dev/loop1 to /dev/md/array1 as a spare, and
force-spare is not set.
mdadm: failed to add /dev/loop1 to existing array /dev/md/array1:
Invalid argument.

which didn't tell me the reason why loop1 must be a spare.

Is this expected ? If so could you enlight me ?

Thanks
-- 
Francis

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

end of thread, other threads:[~2013-10-20 23:59 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 13:22 mdadm 3.3 fails to kick out non fresh disk Francis Moreau
2013-09-13 20:43 ` NeilBrown
2013-09-13 22:35   ` Francis Moreau
2013-09-13 23:56     ` Roberto Spadim
2013-09-14 10:38     ` NeilBrown
2013-09-14 14:33       ` Francis Moreau
2013-09-14 15:06         ` Francis Moreau
2013-09-14 20:43           ` Martin Wilck
2013-09-16 13:56             ` Francis Moreau
2013-09-16 17:04               ` Martin Wilck
2013-09-20  8:56                 ` Francis Moreau
2013-09-20 18:07                   ` Martin Wilck
2013-09-20 21:08                     ` Francis Moreau
2013-09-21 13:22                       ` Francis Moreau
2013-09-23 20:02                         ` Martin Wilck
2013-09-27  8:26                           ` Francis Moreau
2013-09-27 15:47                             ` Francis Moreau
2013-10-02 18:33                               ` Martin Wilck
2013-10-16  4:57                                 ` NeilBrown
2013-10-16 20:10                                   ` Francis Moreau
2013-10-17 10:58                                     ` NeilBrown
2013-10-19 20:21                                       ` Martin Wilck
2013-10-20 23:59                                         ` NeilBrown
2013-09-24 17:38                         ` Martin Wilck
2013-09-24 17:43                           ` Martin Wilck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).