GNU/Linux >> Tutoriels Linux >  >> Cent OS

"Le volume "myvg/vol01" n'est pas actif localement" - CentOS/RHEL

Le problème

Lors de la tentative de création d'un volume logique, lvcreate échoue avec l'erreur "Le volume "myvg/vol01" n'est pas actif localement" même si le groupe de volumes est actif, avec une sortie d'erreur telle que la suivante :

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

Le "volume_list" est commenté dans le fichier lvm.conf et le "groupe de volumes" n'a pas été ajouté au volume_list.

Le volume physique et le groupe de volumes ont été créés avec succès :

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

La ‘volume_list’ est modifiée et aucun groupe de volumes n’a été ajouté :

[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 et VG sont 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

Erreur lors de la création du volume logique et après l'activation manuelle de 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 solution

Utilisez la sauvegarde de lvm.conf et commentez "#" la ligne "volume_list" dans /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.

Ou ajoutez le groupe de volumes à 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.

Essayez d'exécuter la commande "lvcreate" :

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


Cent OS
  1. Commande semanage introuvable dans CentOS 8 / RHEL 8

  2. CentOS / RHEL :Comment restaurer/récupérer un groupe de volumes supprimé dans LVM

  3. Les systèmes de fichiers ne sont pas montés dans l'ordre sur CentOS/RHEL 7

  4. Le volume "test_vg/lvol0" n'est pas actif localement - Erreur lors de l'exécution de lvcreate

  5. "-bash:route:commande introuvable" sur CentOS/RHEL 7

Comment augmenter la taille d'échange sur RHEL 8 / CentOS 8

Comment intégrer RHEL 7 ou CentOS 7 avec Windows Active Directory

Installer et configurer GlusterFS sur CentOS 7 / RHEL 7

Commande semanage introuvable dans CentOS 7/6 et RHEL 7/6 - Solution rapide

Commande netstat introuvable sur CentOS 8 / RHEL 8 - Solution rapide

Commande ifconfig introuvable sur CentOS 8 / RHEL 8 - Solution rapide