[linux-lvm] Simulating LVM Mirror Failure and recovery

Klaus Strebel klaus.strebel at gmx.net
Thu Apr 16 10:26:16 UTC 2009


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

Hi yogeen,

i guess you wanted to do a 'dd if=/dev/zero of=/dev/sdb3 count=10', with
your command, you filled the logical volume with zeros and that is
mirrored perfectly on both underlying devices - as it should ;-).



-- 
Mit freundlichen Grüssen / best regards

Klaus Strebel, Dipl.-Inform. (FH), mailto:klaus.strebel at gmx.net

/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \




More information about the linux-lvm mailing list