Use the
--uuid
and
--restorefile
arguments of the
pvcreate
command to restore the
physical volume. The following example labels the
/dev/sdh1
device as a physical volume with
the UUID indicated above,
FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk
. This command
restores the physical volume label with the metadata information contained in
VG_00050.vg
, the
most recent good archived metatdata for volume group . The
restorefile
argument instructs
the
pvcreate
command to make the new physical volume compatible with the old one on the
volume group, ensuring that the the new metadata will not be placed where the old physical
volume contained data (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
LSize
Origin Snap%
Move Log Copy%
Devices
stripe VG
-wi--- 300.00G
/dev/sdh1
(0),/dev/sda1(0)
stripe VG
-wi--- 300.00G
/dev/sdh1
(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
LSize
Origin Snap%
Move Log Copy%
Devices
stripe VG
-wi-a- 300.00G
/dev/sdh1
(0),/dev/sda1(0)
stripe VG
-wi-a- 300.00G
/dev/sdh1
(34728),/dev/sdb1(0)
Recovering Physical Volume Metadata
75
Содержание GLOBAL FILE SYSTEM 5.0
Страница 1: ...LVM Administrator s Guide Configuration and Administration 5 0 ISBN N A Publication date...
Страница 4: ...LVM Administrator s Guide...
Страница 8: ...viii...
Страница 18: ...6...
Страница 28: ...16...
Страница 32: ...20...
Страница 80: ...68...
Страница 90: ...78...
Страница 92: ...80...
Страница 94: ...82...
Страница 112: ...100...