GNU/Linux >> Linux Esercitazione >  >> Cent OS

“Il volume “myvg/vol01″ non è attivo localmente” – CentOS/RHEL

Il problema

Durante il tentativo di creare un volume logico, lvcreate non riesce con l'errore "Il volume "myvg/vol01″ non è attivo localmente" anche se il gruppo di volumi è attivo, con un output di errore come il seguente:

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

La "lista_volume" è commentata nel file lvm.conf e il "gruppo di volumi" non è stato aggiunto alla lista_volume.

Il volume fisico e il gruppo di volumi sono stati creati correttamente:

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

La "lista_volume" è stata modificata e non è stato aggiunto alcun gruppo di volumi:

[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 e VG sono visibili:

[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

Errore durante la creazione del volume logico e dopo l'attivazione manuale di VG:

[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 soluzione

Avvalersi del backup di lvm.conf e commentare “#” la riga “volume_list” in /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.

Oppure aggiungi il gruppo di volumi 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.

Prova a eseguire il comando "lvcreate":

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


Cent OS
  1. Modifica il runlevel predefinito in CentOS 7 / RHEL 7

  2. comando semanage non trovato in CentOS 8 / RHEL 8

  3. comando ifconfig non trovato – CentOS/RHEL 7

  4. I filesystem non vengono montati in ordine su CentOS/RHEL 7

  5. Il volume "test_vg/lvol0" non è attivo localmente – Errore durante l'esecuzione di lvcreate

Come aumentare le dimensioni dello scambio su RHEL 8 / CentOS 8

Come integrare RHEL 7 o CentOS 7 con Windows Active Directory

Installa e configura GlusterFS su CentOS 7 / RHEL 7

comando semanage non trovato in CentOS 7/6 e RHEL 7/6 – Correzione rapida

netstat Comando non trovato su CentOS 8 / RHEL 8 – Correzione rapida

ifconfig Comando non trovato su CentOS 8 / RHEL 8 – Correzione rapida