Replacing A Missing Physical Volume - Red Hat ENTERPRISE LINUX 4 - LVM ADMINISTRATOR Manual

Cluster logical volume manager
Table of Contents

Advertisement

(which could happen, for example, if the original pvcreate command had used the command line
arguments that control metadata placement, or it the physical volume was originally created using a
different version of the software that used different defaults). The pvcreate command overwrites only
the LVM metadata areas and does not affect the existing data areas.
[root@link-07 backup]# pvcreate --uuid "FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-
NYM5Sk" --restorefile /etc/lvm/archive/VG_00050.vg /dev/sdh1
Physical volume "/dev/sdh1" successfully created
You can then use the vgcfgrestore command to restore the volume group's metadata.
[root@link-07 backup]# vgcfgrestore VG
Restored volume group VG
You can now display the logical volumes.
[root@link-07 backup]# lvs -a -o +devices
LV
VG
Attr
stripe VG
-wi--- 300.00G
dev/sda1(0)
stripe VG
-wi--- 300.00G
(34728),/dev/sdb1(0)
The following commands activate the volumes and display the active volumes.
[root@link-07 backup]# lvchange -ay /dev/VG/stripe
[root@link-07 backup]# lvs -a -o +devices
LV
VG
Attr
stripe VG
-wi-a- 300.00G
dev/sda1(0)
stripe VG
-wi-a- 300.00G
(34728),/dev/sdb1(0)
If the on-disk LVM metadata takes as least as much space as what overrode it, this command can
recover the physical volume. If what overrode the metadata went past the metadata area, the data
on the volume may have been affected. You might be able to use the fsck command to recover that
data.

6.5. Replacing a Missing Physical Volume

If a physical volume fails or otherwise needs to be replaced, you can label a new physical volume to
replace the one that has been lost in the existing volume group by following the same procedure as
you would for recovering physical volume metadata, described in
Volume
Metadata". You can use the --partial and --verbose arguments of the vgdisplay
command to display the UUIDs and sizes of any physical volumes that are no longer present. If you
LSize
Origin Snap%
LSize
Origin Snap%
Replacing a Missing Physical Volume
Move Log Copy%
Devices
/dev/sdh1 (0),/
/dev/sdh1
Move Log Copy%
Devices
/dev/sdh1 (0),/
/dev/sdh1
Section 6.4, "Recovering Physical
71

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 4

Table of Contents