Unable to add a physical volume to volume group

Latest response

I am trying to increase the space allocated for /dev/sda2 which is mounted as '/'. I have just added a new LVM Partition /dev/sda4 for 20GBsize and I need to extend the /dev/sda2 have that additional 20GB. The issue I seeing is there are no Volume Group and anything to create using vgcreate newvg1 /dev/sda2 /dev/sda4 ending in error:

[root@localhost cmanbin]# vgcreate vg1 /dev/sda2 /dev/sda4
Can't open /dev/sda2 exclusively. Mounted filesystem?
Unable to add physical volume '/dev/sda2' to volume group 'vg1'.

I have RHEL 6.8, installed as a VMWare machine on Mac system.

Responses

This is a disk partition which is /dev/sda2 on which root file system is installed which is not an LVM. If this is the case then you can't increase the block device size easily, there are some advanced steps but not recommended. If this is a new virtual system then you may re-install and plan the file system properly as lvm. Try running "lsblk" command to check out file systems and corresponding mount points, and type. Check if there is a lvm listed under sda2 device, basically check for "/" (root) mount point.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.