GNU/Linux >> Znalost Linux >  >> Cent OS

„Svazek „myvg/vol01″ není aktivní lokálně“ – CentOS/RHEL

Problém

Při pokusu o vytvoření logického svazku selže lvcreate s chybou „Svazek „myvg/vol01″ není aktivní lokálně“, přestože je skupina svazků aktivní, s chybovým výstupem, jako je tento:

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

"volume_list" je zakomentován v souboru lvm.conf a "volume group" nebyl přidán do volume_list.

Fyzický svazek a skupina svazků byly úspěšně vytvořeny:

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

‚volume_list‘ je upraven a není přidána žádná skupina svazků:

[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 a VG jsou viditelné:

[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

Chyba při vytváření logického svazku a po ruční aktivaci 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.

Řešení

Použijte zálohu lvm.conf a okomentujte „# “ řádek „volume_list“ v /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.

Nebo přidejte skupinu svazků do seznamu svazků

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

Zkuste spustit příkaz „lvcreate“:

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


Cent OS
  1. Příkaz semanage nebyl nalezen v CentOS 8 / RHEL 8

  2. příkaz ifconfig nenalezen – CentOS/RHEL 7

  3. „lsb_release:příkaz nenalezen“ – Oprava v CentOS/RHEL

  1. CentOS / RHEL :Jak obnovit/obnovit smazanou skupinu svazků v LVM

  2. Souborové systémy se na CentOS/RHEL 7 nepřipojují v pořádku

  3. „-bash:route:command not found“ na CentOS/RHEL 7

  1. Svazek „test_vg/lvol0“ není lokálně aktivní – Chyba při spouštění lvcreate

  2. ping nefunguje na nově vytvořeném serveru CentOS/RHEL

  3. CentOS / RHEL LVM:Zálohování metadat skupiny svazků