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:
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 ...