Recovering From Lvm Mirror Failure - Red Hat LVM ADMINISTRATOR 5.0 Administrator's Manual

Table of Contents

Advertisement

3. Recovering from LVM Mirror Failure

This section provides an example of recovering from a situation where one leg of an LVM
mirrored volume fails because the underlying device for a physical volume goes down. When a
mirror leg fails, LVM converts the mirrored volume into a linear volume, which continues to
operate as before but without the mirrored redundancy. At that point, you can add a new disk
device to the system to use as a replacement physical device and rebuild the mirror.
The following command creates the physical volumes which will be used for the mirror.
[root@link-08 ~]# pvcreate /dev/sd[abcdefgh][12]
Physical volume "/dev/sda1" successfully created
Physical volume "/dev/sda2" successfully created
Physical volume "/dev/sdb1" successfully created
Physical volume "/dev/sdb2" successfully created
Physical volume "/dev/sdc1" successfully created
Physical volume "/dev/sdc2" successfully created
Physical volume "/dev/sdd1" successfully created
Physical volume "/dev/sdd2" successfully created
Physical volume "/dev/sde1" successfully created
Physical volume "/dev/sde2" successfully created
Physical volume "/dev/sdf1" successfully created
Physical volume "/dev/sdf2" successfully created
Physical volume "/dev/sdg1" successfully created
Physical volume "/dev/sdg2" successfully created
Physical volume "/dev/sdh1" successfully created
Physical volume "/dev/sdh2" successfully created
The following commands creates the volume group
[root@link-08 ~]# vgcreate vg /dev/sd[abcdefgh][12]
Volume group "vg" successfully created
[root@link-08 ~]# lvcreate -L 750M -n groupfs -m 1 vg /dev/sda1 /dev/sdb1
/dev/sdc1
Rounding up size to full physical extent 752.00 MB
Logical volume "groupfs" created
You can use the
command to verify the layout of the mirrored volume and the underlying
lvs
devices for the mirror leg and the mirror log. Note that in the first example the mirror is not yet
completely synced; you should wait until the
[root@link-08 ~]# lvs -a -o +devices
LV
Copy% Devices
groupfs
21.28 groupfs_mimage_0(0),groupfs_mimage_1(0)
[groupfs_mimage_0] vg
/dev/sda1(0)
[groupfs_mimage_1] vg
Copy%
VG
Attr
LSize
vg
mwi-a- 752.00M
iwi-ao 752.00M
iwi-ao 752.00M
Recovering from LVM Mirror Failure
and the mirrored volume
vg
field displays 100.00 before continuing.
Origin Snap%
Move Log
.
groupfs
groupfs_mlog
71

Advertisement

Table of Contents
loading

This manual is also suitable for:

Configuration and administration 5.0

Table of Contents