• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Volume “test_vg/lvol0” is not active locally – Error while running lvcreate

by admin

The Problem

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

# lvcreate -L 4G test_vg
Volume "test_vg/lvol0" is not active locally.
Aborting. Failed to wipe start of new LV.

The Root Cause

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:

# pvcreate /dev/sdc1
Physical volume "/dev/sdc1" successfully created
# vgcreate test_vg /dev/sdc1
Volume group "test_vg" successfully created

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

# cat /etc/lvm/lvm.conf| grep -i "volume_list"
...
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
...

– PV and VG are visible:

# 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

Error while creating logical volume and after activation of VG manually:

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

The Solution

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

# less /etc/lvm/lvm.conf | grep -i "volume_list"
...
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
...

Or add the Volume Group to volume_list.

# less /etc/lvm/lvm.conf|grep -i "volume_list"
volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*", "Volume Group Name" ]

Try to run ‘lvcreate’ command:

# lvcreate -L 4G test_vg
Logical volume "lvol0" created.

Filed Under: CentOS/RHEL 5, CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. Manual Changes Made To /etc/hosts Or /etc/sysconfig/network-scripts/ifcfg-* Are Lost
  2. RHEL 7 – RHCSA Notes : Change passwords and adjust password aging for local user accounts
  3. How to change a system’s machine-ID in Oracle Enterprise Linux 7
  4. How to analyze basic system performance using – vmstat, sar, iostat and mpstat
  5. CentOS/RHEL – How to run a script or command when any user logout the ssh session
  6. CentOS / RHEL : How to block incoming and outgoing ports using iptables
  7. How to configure iSCSI Initiator (client) in CentOS / RHEL 7
  8. What is the difference between the -i and -U options used in rpm command in Linux
  9. How to automate sftp file transfers using expect utility
  10. Beginners Guide to Managing Package Module Streams in CentOS/RHEL 8

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright