From: NeilBrown <neilb@suse.de>
To: Pavel Hofman <pavel.hofman@ivitera.com>
Cc: linux RAID <linux-raid@vger.kernel.org>
Subject: Re: How to update homehost of an existing raid component
Date: Tue, 20 Mar 2012 08:28:28 +1100 [thread overview]
Message-ID: <20120320082828.0937662d@notabene.brown> (raw)
In-Reply-To: <4F670361.6090902@ivitera.com>
[-- Attachment #1: Type: text/plain, Size: 4264 bytes --]
On Mon, 19 Mar 2012 10:58:57 +0100 Pavel Hofman <pavel.hofman@ivitera.com>
wrote:
> Hi,
>
> Please is there a way to update a homehost value for a specific raid
> component?
>
> md7 is raid1 composed of md5 and md6. UUID of md7 is listed in mdadm.conf:
>
> ARRAY /dev/md7 level=raid1 num-devices=2 metadata=01.00
> UUID=dde16cd5:2e17c743:fcc7926c:fcf5081e
>
>
> Every time I reboot, md7 is auto assembled only from md5. When running
> manually, I get
>
> mdadm --verbose -A /dev/md7 --scan
> ...
> mdadm: /dev/md6 misses out due to wrong homehost
> ...
>
There is something very strange here.
md5 and md6 look to some extent like different parts of the same RAID1.
They have the same Array UUID, the same "Update Time" and the same "Events"
counter.
However they have different "Creation Time" (19/Jan/2011 vs 17/Jun/2010) and
different names ("orfeus:7" vs "'orpheus':7").
I cannot imagine how that would happen.
mdadm notices they are different so it cannot use them both. It chooses md5
over md6 as md5 has the 'correct' homehost name.
Your best bet would be to re-create the array so it gets good clean metadata.
mdadm -S /dev/md7
mdadm -C /dev/md7 -l1 -n2 --assume-clean --metadata=1.0 /dev/md6 /dev/md5
should do it. If you want to keep the same uuid, add
--uuid=dde16cd5:2e17c743:fcc7926c:fcf5081e
to that command.
--update=homehost only works when assembling, and updates the homehost for
all members of the array. The would work if the create times were the same,
but a they are different, mdadm thinks they are different arrays.
NeilBrown
>
> Indeed, all the raid components (there are many more belonging to
> different raids on my machine) list the "local to host orfeus" homehost,
> such as:
>
> orfeus:~# mdadm --examine /dev/md5
> /dev/md5:
> Magic : a92b4efc
> Version : 1.0
> Feature Map : 0x0
> Array UUID : dde16cd5:2e17c743:fcc7926c:fcf5081e
> Name : orfeus:7 (local to host orfeus)
> Creation Time : Wed Jan 19 21:36:19 2011
> Raid Level : raid1
> Raid Devices : 2
>
> Avail Dev Size : 4356361184 (2077.27 GiB 2230.46 GB)
> Array Size : 4356361184 (2077.27 GiB 2230.46 GB)
> Super Offset : 4356361440 sectors
> State : clean
> Device UUID : a4973bb6:2cd83805:ba441193:56321f9b
>
> Update Time : Mon Mar 19 02:36:33 2012
> Checksum : 7b8eeffd - correct
> Events : 11853346
>
>
> Device Role : Active device 1
> Array State : AA ('A' == active, '.' == missing)
>
>
> While the md6 has the homehost different:
> orfeus:~# mdadm --examine /dev/md6
> /dev/md6:
> Magic : a92b4efc
> Version : 1.0
> Feature Map : 0x0
> Array UUID : dde16cd5:2e17c743:fcc7926c:fcf5081e
> Name : 'orfeus':7
> Creation Time : Thu Jun 17 22:51:47 2010
> Raid Level : raid1
> Raid Devices : 2
>
> Avail Dev Size : 4356361184 (2077.27 GiB 2230.46 GB)
> Array Size : 4356361184 (2077.27 GiB 2230.46 GB)
> Super Offset : 4356361440 sectors
> State : clean
> Device UUID : 9144c9ad:8ee3ed37:69b53956:03bebdd6
>
> Update Time : Mon Mar 19 02:36:33 2012
> Checksum : 94c11ff3 - correct
> Events : 11853346
>
>
> Device Role : Active device 0
> Array State : AA ('A' == active, '.' == missing)
>
>
> There is no "local to host orfeus" in homehost of md6. Otherwise, the
> array UUID fits that of md7. It was added after last reboot when the
> array failed to assemble automatically.
>
> Following the man page, I tried running
>
> mdadm --verbose -A /dev/md7 --update=homehost --scan
>
> with no difference. Unfortunately I was not able to find how to change
> the homehost of md6 to be local to orfeus. I do not want to force adding
> md6 to the array and go through the whole rebuild since the data
> themselves are OK.
>
>
> Thanks a lot for any hints and help.
>
> Best regards,
>
>
> Pavel.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2012-03-19 21:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 9:58 How to update homehost of an existing raid component Pavel Hofman
2012-03-19 16:46 ` John Robinson
2012-03-19 20:21 ` Pavel Hofman
2012-03-19 21:28 ` NeilBrown [this message]
2012-03-19 21:37 ` Pavel Hofman
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=20120320082828.0937662d@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=pavel.hofman@ivitera.com \
/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 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).