Il problema
Durante il tentativo di creare un volume logico, lvcreate non riesce con l'errore "Il volume "test_vg/lvol0″ non è attivo localmente" anche se il gruppo di volumi è attivo, con un output di errore come il seguente:
# lvcreate -L 4G test_vg Volume "test_vg/lvol0" is not active locally. Aborting. Failed to wipe start of new LV.
La causa principale
La "lista_volume ” è commentato nel file lvm.conf e 'gruppo di volumi' non è stato aggiunto a volume_list.
– Il volume fisico e il gruppo di volumi sono stati creati correttamente:
# pvcreate /dev/sdc1 Physical volume "/dev/sdc1" successfully created
# vgcreate test_vg /dev/sdc1 Volume group "test_vg" successfully created
– La "lista_volume" è stata modificata e non è stato aggiunto alcun gruppo di volumi:
# cat /etc/lvm/lvm.conf| grep -i "volume_list" ... # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] ...
– PV e VG sono visibili:
# vgdisplay |grep -i "test_vg" VG Name test_vg
# 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 test_vg lvm2 a--u 4.99g 4.99g
Errore durante la creazione del volume logico e dopo l'attivazione manuale di VG:
# lvcreate -L 4G test_vg Volume "test_vg/lvol0" is not active locally. Aborting. Failed to wipe start of new LV.
# vgchange -ay test_vg 0 logical volume(s) in volume group "test_vg" now active
# lvcreate -L 4G test_vg Volume "test_vg/lvol0" 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.
# less /etc/lvm/lvm.conf | grep -i "volume_list" ... # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] ...
Oppure aggiungi il gruppo di volumi a volume_list.
# less /etc/lvm/lvm.conf|grep -i "volume_list" volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*", "Volume Group Name" ]
Prova a eseguire il comando "lvcreate":
# lvcreate -L 4G test_vg Logical volume "lvol0" created.