Chapter 6. LVM Troubleshooting
68
you would for recovering physical volume metadata, described in
Section 6.4, “Recovering Physical
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
wish to substitute another physical volume of the same size, you can use the
pvcreate
command
with the
--restorefile
and
--uuid
arguments to initialize a new device with the same UUID as
the missing physical volume. You can then use the
vgcfgrestore
command to restore the volume
group's metadata.
6.6. Removing Lost Physical Volumes from a Volume Group
If you lose a physical volume, you can activate the remaining physical volumes in the volume group
with the
--partial
argument of the
vgchange
command. You can remove all the logical volumes
that used that physical volume from the volume group with the
--removemissing
argument of the
vgreduce
command.
It is recommended that you run the
vgreduce
command with the
--test
argument to verify what you
will be destroying.
Like most LVM operations, the
vgreduce
command is reversible in a sense if you immediately
use the
vgcfgrestore
command to restore the volume group metadata to its previous state. For
example, if you used the
--removemissing
argument of the
vgreduce
command without the
--
test
argument and find you have removed logical volumes you wanted to keep, you can still replace
the physical volume and use another
vgcfgrestore
command to return the volume group to its
previous state.
6.7. Insufficient Free Extents for a Logical Volume
You may get the error message "Insufficient free extents" when creating a logical volume when you
think you have enough extents based on the output of the
vgdisplay
or
vgs
commands. This is
because these commands round figures to 2 decimal places to provide human-readable output. To
specify exact size, use free physical extent count instead of some multiple of bytes to determine the
size of the logical volume.
The
vgdisplay
command, by default, includes this line of output that indicates the free physical
extents.
#
vgdisplay
--- Volume group ---
...
Free PE / Size 8780 / 34.30 GB
Alternately, you can use the
vg_free_count
and
vg_extent_count
arguments of the
vgs
command to display the free extents and the total number of extents.
[root@tng3-1 ~]#
vgs -o +vg_free_count,vg_extent_count
VG #PV #LV #SN Attr VSize VFree Free #Ext
testvg 2 0 0 wz--n- 34.30G 34.30G 8780 8780
With 8780 free physical extents, you can run the following command, using the lower-case l argument
to use extents instead of bytes:
Содержание CLUSTER SUITE 4.7 - CLUSTER LVM ADMINISTRATORS
Страница 1: ...Red Hat Cluster Suite 4 7 Cluster Logical Volume Manager LVM Administrator s Guide ...
Страница 6: ...vi ...
Страница 12: ...xii ...
Страница 24: ...12 ...
Страница 62: ...50 ...
Страница 72: ...60 ...
Страница 82: ...70 ...
Страница 84: ...72 ...
Страница 86: ...74 ...
Страница 96: ...84 ...
Страница 103: ...91 Appendix E Revision History Revision History Revision 1 0 ...
Страница 104: ...92 ...
Страница 108: ...96 ...