Chapter 6. LVM Troubleshooting
64
groupfs vg mwi-a- 752.00M groupfs_mlog
100.00 groupfs_mimage_0(0),groupfs_mimage_1(0)
[groupfs_mimage_0] vg iwi-ao 752.00M
/dev/sda1(0)
[groupfs_mimage_1] vg iwi-ao 752.00M
/dev/sdb1(0)
[groupfs_mlog] vg lwi-ao 4.00M i
/dev/sdc1(0)
In this example, the primary leg of the mirror
/dev/sda1
fails. Any write activity to the mirrored
volume causes LVM to detect the failed mirror. When this occurs, LVM converts the mirror into a single
linear volume. In this case, to trigger the conversion, we execute a
dd
command
[root@link-08 ~]#
dd if=/dev/zero of=/dev/vg/groupfs count=10
10+0 records in
10+0 records out
You can use the
lvs
command to verify that the device is now a linear device. Because of the failed
disk, I/O errors occur.
[root@link-08 ~]#
lvs -a -o +devices
/dev/sda1: read failed after 0 of 2048 at 0: Input/output error
/dev/sda2: read failed after 0 of 2048 at 0: Input/output error
LV VG Attr LSize Origin Snap% Move Log Copy% Devices
groupfs vg -wi-a- 752.00M /dev/sdb1(0)
At this point you should still be able to use the logical volume, but there will be no mirror redundancy.
To rebuild the mirrored volume, you replace the broken drive and recreate the physical volume. If you
use the same disk rather than replacing it with a new one, you will see "inconsistent" warnings when
you run the
pvcreate
command.
[root@link-08 ~]#
pvcreate /dev/sda[12]
Physical volume "/dev/sda1" successfully created
Physical volume "/dev/sda2" successfully created
[root@link-08 ~]#
pvscan
PV /dev/sdb1 VG vg lvm2 [67.83 GB / 67.10 GB free]
PV /dev/sdb2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdc1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdc2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdd1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdd2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sde1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sde2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdf1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdf2 VG vg lvm2 [67.83 GB / 67.83 GB free]
Summary of Contents for CLUSTER SUITE 4.7 - CLUSTER LVM ADMINISTRATORS
Page 1: ...Red Hat Cluster Suite 4 7 Cluster Logical Volume Manager LVM Administrator s Guide ...
Page 6: ...vi ...
Page 12: ...xii ...
Page 24: ...12 ...
Page 62: ...50 ...
Page 72: ...60 ...
Page 82: ...70 ...
Page 84: ...72 ...
Page 86: ...74 ...
Page 96: ...84 ...
Page 103: ...91 Appendix E Revision History Revision History Revision 1 0 ...
Page 104: ...92 ...
Page 108: ...96 ...