From: NeilBrown <neilb@suse.de>
To: Francis Moreau <francis.moro@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: mdadm 3.3 fails to kick out non fresh disk
Date: Sat, 14 Sep 2013 06:43:05 +1000 [thread overview]
Message-ID: <20130914064305.0baadc69@notabene.brown> (raw)
In-Reply-To: <CAC9WiBgGgKGHqcwrVo7J_peS8YiH-KBF8T1uGbwJrve_7aa3cw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]
On Fri, 13 Sep 2013 15:22:20 +0200 Francis Moreau <francis.moro@gmail.com>
wrote:
> 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.
That's a worry. I'm not sure how to fix it.
I would probably suggest you don't use "-IR" to add devices. That would make
it a lot less likely to happen.
> # 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.
It must be a spare because it is out of date.
NeilBrown
>
> Is this expected ? If so could you enlight me ?
>
> Thanks
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-09-13 20:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 13:22 mdadm 3.3 fails to kick out non fresh disk Francis Moreau
2013-09-13 20:43 ` NeilBrown [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130914064305.0baadc69@notabene.brown \
--to=neilb@suse.de \
--cc=francis.moro@gmail.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.