From: vu pham <vu@sivell.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Simulating LVM Mirror Failure and recovery
Date: Thu, 16 Apr 2009 09:49:18 -0500 [thread overview]
Message-ID: <49E7456E.5090000@sivell.com> (raw)
In-Reply-To: <49E72412.1070407@wpkg.org>
Tomasz Chmielewski wrote:
> vu pham schrieb:
>
>>> as per the redhat guide this should result in mirror leg failure and
>>> any subsequent write activity to the mirror should convert the mirror
>>> into linear volume. but the output of lvs command still shows copy %
>>> as 100%. also data in filesystem of lv1 is erased and it is converted
>>> into read only filesystem.
>>>
>>> can anyone please let us know the correct way to simulate lvm mirror
>>> failure and recovery.
>>>
>>> thanks and regards
>>
>> I think to simulate error failure you have to write to the underlying
>> devices, not the mirrored device. When you write to the mirrored
>> device, lvl1 in this case, data is mirrored so there is no failure at
>> all. So I think you have to dd to either /dev/sda3 or /dev/sdb3.
>
> How will LVM distinguish between a valid and invalid copy in that case?
>
> Are you sure that on reads, LVM will return data from the "good" copy,
> not the one you just overwrote with "dd if=/dev/zero of=/dev/sdb
> seek=xxx bs=1M count=10"?
Good question. I thought that dd will destroy the lvm information at the
beginning of the partition which makes the leg broken. I made the
following test and the result is odd:
- created mirrored logical volumn mrlv1 on /dev/sdc1 and /dev/sdd1,
having /dev/sdd2 as log device
- mkfs.ext3 /dev/vg1/mrlv1, mount it and copy files onto it.
- dd if=/dev/zero of=/dev/sdd1
- read / write onto the mounted mirror lvm.
The output of lvs shows:
- lvm information on /dev/sdd2 is destroyed
- the 2nd mirror, which is /dev/sdd2, is *unknown device*
- the mirror is still ok
And no lvm log in /var/log/messages.
[root@xen3 ~]# lvs -a -o +devices
Couldn't find device with uuid 'ZUOCeZ-Ssb2-0fP6-n5YY-sz5n-TtXe-b7eL3a'.
Couldn't find device with uuid 'ZUOCeZ-Ssb2-0fP6-n5YY-sz5n-TtXe-b7eL3a'.
Couldn't find device with uuid 'ZUOCeZ-Ssb2-0fP6-n5YY-sz5n-TtXe-b7eL3a'.
Couldn't find device with uuid 'ZUOCeZ-Ssb2-0fP6-n5YY-sz5n-TtXe-b7eL3a'.
Couldn't find device with uuid 'ZUOCeZ-Ssb2-0fP6-n5YY-sz5n-TtXe-b7eL3a'.
Couldn't find device with uuid 'ZUOCeZ-Ssb2-0fP6-n5YY-sz5n-TtXe-b7eL3a'.
Couldn't find device with uuid 'ZUOCeZ-Ssb2-0fP6-n5YY-sz5n-TtXe-b7eL3a'.
LV VG Attr LSize Origin Snap% Move Log
[... deleted unrelated devices ...]
mrlv1 vg1 mwi-ao 200.00M mrlv1_mlog
100.00 mrlv1_mimage_0(0),mrlv1_mimage_1(0)
[mrlv1_mimage_0] vg1 iwi-ao 200.00M
/dev/sdc1(0)
[mrlv1_mimage_1] vg1 iwi-ao 200.00M
unknown device(0)
[mrlv1_mlog] vg1 lwi-ao 4.00M
/dev/sdd2(0)
Vu
next prev parent reply other threads:[~2009-04-16 14:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 10:17 [linux-lvm] Simulating LVM Mirror Failure and recovery yogeen honnavar
2009-04-16 10:26 ` Klaus Strebel
2009-04-16 12:07 ` vu pham
2009-04-16 12:26 ` Tomasz Chmielewski
2009-04-16 14:49 ` vu pham [this message]
2009-04-16 12:54 ` Alasdair G Kergon
2009-04-16 13:36 ` Eric Brunson
2009-04-16 13:58 ` Eric Brunson
2009-04-16 14:18 ` Don Bishop
2009-04-16 14:40 ` Lupe Christoph
2009-04-16 13:19 ` Lupe Christoph
2009-04-16 15:48 ` malahal
2009-04-16 16:02 ` Takahiro Yasui
-- strict thread matches above, loose matches on Subject: below --
2009-04-20 6:07 yogeen honnavar
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=49E7456E.5090000@sivell.com \
--to=vu@sivell.com \
--cc=linux-lvm@redhat.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).