[linux-lvm] Simulating LVM Mirror Failure and recovery

vu pham vu at sivell.com
Thu Apr 16 12:07:57 UTC 2009


yogeen honnavar wrote:
> 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

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.

Vu




More information about the linux-lvm mailing list