linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Simulating LVM Mirror Failure and recovery
@ 2009-04-16 10:17 yogeen honnavar
  2009-04-16 10:26 ` Klaus Strebel
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: yogeen honnavar @ 2009-04-16 10:17 UTC (permalink / raw)
  To: linux-lvm


Dear users,

We have created a mirrored logical volume(lv1) in a volume group vg1. we have 2 disks /dev/sda and /dev/sdb. output of lvs command shows that mirror image_0 is stored on /dev/sda3 and image_1 on /dev/sdb3 and mirror log on /dev/sdb2. Copy % shows 100%. so mirroring is setup correctly.

now we wish to simulate mirror leg failure and recovery. as per the redhat lvm administrators guide we used the following command to trigger the failure of mirror leg1

dd if=/dev/zero of=/dev/vg1/lv1 count=10

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
-yogeen


      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: [linux-lvm] Simulating LVM Mirror Failure and recovery
@ 2009-04-20  6:07 yogeen honnavar
  0 siblings, 0 replies; 14+ messages in thread
From: yogeen honnavar @ 2009-04-20  6:07 UTC (permalink / raw)
  To: LVM general discussion and development


hi all,

Thanks for all the replies. as pointed out by Eric brunson i was referring to the following document

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Cluster_Logical_Volume_Manager/mirrorrecover.html 

i used the below command to simulate failed sda and then wrote some data to the mounted file system to trigger LVM conversion to linear mode.

# echo offline > /sys/block/sda/device/state 

thanks to all.
regards
-yogeen

--- On Thu, 16/4/09, Takahiro Yasui <tyasui@redhat.com> wrote:

> From: Takahiro Yasui <tyasui@redhat.com>
> Subject: Re: [linux-lvm] Simulating LVM Mirror Failure and recovery
> To: "LVM general discussion and development" <linux-lvm@redhat.com>
> Date: Thursday, 16 April, 2009, 9:32 PM
> malahal@us.ibm.com
> wrote:
> > I usually run "echo 1 >
> /sys/block/sda/device/delete" to make /dev/sda
> > disappear and fail for LVM tests. You can fail the
> disk in a lot of ways
> > depending on your hardware, but this trick works with
> almost every
> > device!
> 
> # echo offline > /sys/block/sda/device/state
> 
> might work as well. In this case, you can recover the
> failure by
> 
> # echo running > /sys/block/sda/device/state
> 
> Thanks,
> Taka
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 


      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

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

end of thread, other threads:[~2009-04-20  6:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).