GNU/Linux >> Tutoriales Linux >  >> Cent OS

“El volumen “myvg/vol01″ no está activo localmente” – CentOS/RHEL

El problema

Al intentar crear un volumen lógico, lvcreate falla con el error "El volumen "myvg/vol01" no está activo localmente" aunque el grupo de volúmenes está activo, con una salida de error como la siguiente:

[root@ ~]# lvcreate -L 4G myvg
Volume "myvg/vol01" is not active locally.
Aborting. Failed to wipe start of new LV.

La "lista_de_volumen" está comentada en el archivo lvm.conf y el "grupo de volumen" no se agregó a la lista_de_volumen.

El volumen físico y el grupo de volúmenes se crearon correctamente:

[root@ ~]# pvcreate /dev/sdc1
Physical volume "/dev/sdc1" successfully created
[root@ ~]# vgcreate myvg /dev/sdc1
Volume group "myvg" successfully created

Se modifica la 'lista_de_volumen' y no se agregó ningún grupo de volumen:

[root@ ~]# cat /etc/lvm/lvm.conf | grep -i "volume_list"

# it is auto-activated. The auto_activation_volume_list setting
# Configuration option activation/volume_list.
# or VG. See tags/hosttags. If any host tags exist but volume_list
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# Configuration option activation/auto_activation_volume_list.
# This list works like volume_list, but it is used only by
# auto-activation, must also be selected by volume_list (if defined)
# or VG. See tags/hosttags. If any host tags exist but volume_list
# auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# Configuration option activation/read_only_volume_list.
# or VG. See tags/hosttags. If any host tags exist but volume_list
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# The rules are the same as those for volume_list.
# The rules are the same as those for auto_activation_volume_list

PV y VG son visibles:

[root@ ~]# vgdisplay |grep -i "myvg"
VG Name myvg
[root@ ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_6 lvm2 a--u 29.51g 0
/dev/sdb1 testvg lvm2 a--u 9.99g 7.99g
/dev/sdc1 myvg lvm2 a--u 4.99g 4.99g

Error al crear el volumen lógico y después de la activación de VG manualmente:

[root@ ~]# lvcreate -L 4G myvg
Volume "myvg/vol01" is not active locally.
Aborting. Failed to wipe start of new LV.
[root@ ~]# vgchange -ay myvg
0 logical volume(s) in volume group "myvg" now active
[root@ ~]# lvcreate -L 4G myvg
Volume "myvg/vol01" is not active locally.
Aborting. Failed to wipe start of new LV.

La solución

Aproveche la copia de seguridad de lvm.conf y comente "#" en la línea "volume_list" en /etc/lvm/lvm.conf .

[root@ ~]# less /etc/lvm/lvm.conf | grep -i "volume_list"
# it is auto-activated. The auto_activation_volume_list setting
# Configuration option activation/volume_list.
# or VG. See tags/hosttags. If any host tags exist but volume_list
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# Configuration option activation/auto_activation_volume_list.
# This list works like volume_list, but it is used only by
# auto-activation, must also be selected by volume_list (if defined)
# or VG. See tags/hosttags. If any host tags exist but volume_list
# auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# Configuration option activation/read_only_volume_list.
# or VG. See tags/hosttags. If any host tags exist but volume_list
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# The rules are the same as those for volume_list.
# The rules are the same as those for auto_activation_volume_list.

O agregue el grupo de volumen a volume_list

[root@ ~]# less /etc/lvm/lvm.conf | grep -i "volume_list"

# it is auto-activated. The auto_activation_volume_list setting
# Configuration option activation/volume_list.
# or VG. See tags/hosttags. If any host tags exist but volume_list
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*", "Volume Group Name" ]
# Configuration option activation/auto_activation_volume_list.
# This list works like volume_list, but it is used only by
# auto-activation, must also be selected by volume_list (if defined)
# or VG. See tags/hosttags. If any host tags exist but volume_list
# auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# Configuration option activation/read_only_volume_list.
# or VG. See tags/hosttags. If any host tags exist but volume_list
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# The rules are the same as those for volume_list.
# The rules are the same as those for auto_activation_volume_list.

Intente ejecutar el comando 'lvcreate':

[root@ ~]# lvcreate -L 4G myvg
Logical volume "vol01" created.


Cent OS
  1. CentOS / RHEL:cómo restaurar/recuperar un grupo de volúmenes eliminado en LVM

  2. Los sistemas de archivos no se montan en orden en CentOS/RHEL 7

  3. El volumen "test_vg/lvol0" no está activo localmente:error al ejecutar lvcreate

  4. “lsb_release:comando no encontrado” – Corrección en CentOS/RHEL

  5. “-bash:ruta:comando no encontrado” en CentOS/RHEL 7

Cómo aumentar el tamaño de intercambio en RHEL 8 / CentOS 8

Cómo integrar RHEL 7 o CentOS 7 con Windows Active Directory

Instalar y configurar GlusterFS en CentOS 7/RHEL 7

Comando semanage no encontrado en CentOS 7/6 y RHEL 7/6 – Solución rápida

Comando netstat no encontrado en CentOS 8 / RHEL 8 – Solución rápida

Comando ifconfig no encontrado en CentOS 8 / RHEL 8 – Solución rápida