From: Phil Turmel <philip@turmel.org>
To: "Rainer Fügenstein" <rfu@oudeis.org>, linux-raid@vger.kernel.org
Subject: Re: Found duplicate PV: using /dev/sda3 not /dev/md1
Date: Sun, 15 Jun 2014 22:46:40 -0400 [thread overview]
Message-ID: <539E5A90.3080207@turmel.org> (raw)
In-Reply-To: <1454723160.20140615203503@oudeis.org>
Hi Rainer,
[please don't top-post, please *do* trim your replies]
On 06/15/2014 02:35 PM, Rainer Fügenstein wrote:
> today I replaced two old 750GB disks in a RAID1 with two new 1TB
> disks:
>
> /dev/md0 (sda1, sdb1) (root filesystem)
> /dev/md1 (sda3, sdb3) LVM with /var (and others)
> /dev/md1:
> Version : 0.90
> Creation Time : Mon Jun 6 23:12:19 2011
> Raid Level : raid1
Your problem is that you are using version 0.90 metadata. It and v1.0
put the superblock at the end of the member devices, and it cannot be
found if the device size changes. Plus, the data starts at sector zero,
so if the MD superblock isn't found, the device content is identified
without the raid layer.
These metadata formats should only be used with boot partitions that
need to be readable without assembling the array.
> status update:
>
> the server is running under a slight load, some incoming mails and
> logging (messages, maillog). no data corruption so far.
Just luck. . .
> my assumption: since all writes go to /dev/sda3 via LVM, no writes go
> to the raid, therefore it doesn't sync, therefore no data corruption.
Your PV is /dev/sda3, and it is also the rebuild target of your md1
array, so writes to it are coming from two directions. Your lack of
corruption at the moment is a lucky fluke.
You need to stop /dev/md1 as soon as possible to eliminate the chances
of further corruption.
If you must keep the server online, I recommend the following steps:
1) Create a new /dev/md1 array with v1.2 metadata, and just /dev/sdb3.
Use "missing" for the second copy. Zero the beginning of /dev/sdb3 to
make sure it is not misidentified as the old PV.
2) Create a new PV on the new /dev/md1 and add it to your existing
volume group.
3) Use "pvmove" to migrate the LVs in your volume group from /dev/sda3
to the new /dev/md1.
4) When the /dev/sda3 PV is empty, remove it from the volume group and
pvremove its signature.
5) Add the cleared /dev/sda3 to the new /dev/md1 and let it rebuild.
The v1.2 metadata will prevent this problem from happening again.
6) Update your mdadm.conf file, lvm.conf file (if necessary) and then
update your initramfs.
HTH,
Phil
--
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
next prev parent reply other threads:[~2014-06-16 2:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 21:58 Found duplicate PV: using /dev/sda3 not /dev/md1 Rainer Fügenstein
2014-06-15 18:35 ` Rainer Fügenstein
2014-06-16 2:46 ` Phil Turmel [this message]
[not found] ` <19411862.20140616155327@oudeis.org>
2014-06-16 14:35 ` Phil Turmel
2014-06-16 18:20 ` Re[2]: " Rainer Fügenstein
2014-06-16 20:15 ` Phil Turmel
2014-06-16 20:28 ` Re[2]: " Rainer Fügenstein
2014-06-16 20:54 ` Phil Turmel
2014-06-17 1:27 ` Re[2]: " Rainer Fügenstein
2014-06-17 11:57 ` Phil Turmel
2014-06-17 12:00 ` Phil Turmel
2014-06-17 14:12 ` Re[2]: " Rainer Fügenstein
2014-08-06 12:49 ` Re[3]: " Rainer Fügenstein
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=539E5A90.3080207@turmel.org \
--to=philip@turmel.org \
--cc=linux-raid@vger.kernel.org \
--cc=rfu@oudeis.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.