Removing Lost Physical Volumes From A Volume Group; Insufficient Free Extents For A Logical Volume - Red Hat ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION:
Table of Contents

Advertisement

Chapter 6. LVM Troubleshooting
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
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
testvg
2
0
With 8780 free physical extents, you can run the following command, using the lower-case l argument
to use extents instead of bytes:
74
8780 / 34.30 GB
VSize
VFree
0 wz--n- 34.30G 34.30G 8780 8780
Free #Ext

Advertisement

Table of Contents
loading

Table of Contents