The Problem

While trying to create a logical volume, lvcreate fails with error “Volume “myvg/vol01″ Is Not Active Locally” even though the volume group is active, with an error output such as the following:

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

The “volume_list” is commented out in lvm.conf file and ‘volume group’ was not added to the volume_list.

Physical volume and Volume group was successfully created:

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

The ‘volume_list’ is modified and there is no volume group was added:

[[email protected] ~]# 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 and VG are visible:

[[email protected] ~]# vgdisplay |grep -i "myvg"
VG Name myvg
[[email protected] ~]# 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 while creating logical volume and after activation of VG manually:

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

The Solution

Avail the backup of lvm.conf and comment “# ” the line “volume_list” in /etc/lvm/lvm.conf.

[[email protected] ~]# 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.

Or add the Volume Group to volume_list

[[email protected] ~]# 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.

Try to run ‘lvcreate’ command:

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