6.7. Extensiones libres insuficientes para un volumen lógico
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.
El comando
vgdisplay, por defecto, incluye esta línea en el mensaje de salida para indicar las extensiones físicas libres.
vgdisplay
# vgdisplay
--- Volume group ---
...
Free PE / Size 8780 / 34.30 GB
Alternativamente, puede utilizar las opciones
vg_free_count y vg_extent_count del comando vgs para ver las extensiones libres y el número total de extensiones.
vgs -o +vg_free_count,vg_extent_count
[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
Con 8780 extensiones físicas libres, puede ejecutar el siguiente comando con la opción l (en minúscula) para usar las extensiones en vez de bytes:
lvcreate -l8780 -n testlv testvg
# lvcreate -l8780 -n testlv testvg
Esto utiliza todas las extensiones libres en el grupo de volúmenes.
vgs -o +vg_free_count,vg_extent_count
# vgs -o +vg_free_count,vg_extent_count
VG #PV #LV #SN Attr VSize VFree Free #Ext
testvg 2 1 0 wz--n- 34.30G 0 0 8780
Alternately, you can extend the logical volume to use a percentage of the remaining free space in the volume group by using the
-l argument of the lvcreate command. For information, see Sección 4.4.1.1, “Cómo crear volúmenes lineales”.