pvcreate Error – Device /dev/sda3 Not Found or Ignored by Filtering

lvmvmware-vsphere

've read tons of threads about this problem, but nothing seems to work for me.

I'm trying to expand the LVM volume of virtual machine located on our vSphere. This VM runs Debian 9. I already made the same thing on a CentOS7 without any trouble. So here I am.

In vSphere, the VM has a 100 GB storage. And we want to expand the current storage to fill that space.

root@build:/home/robot# df -h
Filesystem                  Size  Used Avail Use% Mounted on
udev                        3.9G     0  3.9G   0% /dev
tmpfs                       799M  8.8M  791M   2% /run
/dev/mapper/build--vg-root   51G   45G  3.7G  93% /
tmpfs                       4.0G     0  4.0G   0% /dev/shm
tmpfs                       5.0M     0  5.0M   0% /run/lock
tmpfs                       4.0G     0  4.0G   0% /sys/fs/cgroup
/dev/sda1                   236M   37M  188M  17% /boot
tmpfs                       799M     0  799M   0% /run/user/1000
tmpfs                       799M     0  799M   0% /run/user/1001

You can see the build–vg-root storage is almost full.

I already created the /dev/sda3 physical partition to hold the expanded storage…

root@build:/home/robot# fdisk -l
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0aed3b2c

Device     Boot  Start       End   Sectors  Size Id Type
/dev/sda1  *      2048    499711    497664  243M 83 Linux
/dev/sda2       501758 125827071 125325314 59.8G  5 Extended
/dev/sda3       499712    501757      2046 1023K 8e Linux LVM
/dev/sda5       501760 125827071 125325312 59.8G 8e Linux LVM

…but when I run the pvcreate, I get an error…classical:

root@build:/home/robot# pvcreate /dev/sda3
  Device /dev/sda3 not found (or ignored by filtering).

There is no filter in the /etc/lvm/lvm.conf file, which is OOTB. I rebooted the VM several times, tried :

root@build:/home/robot# partprobe -s
/dev/sda: msdos partitions 1 3 2 <5>
/dev/mapper/build--vg-root: loop partitions 1
/dev/mapper/build--vg-swap_1: loop partitions 1

…but also:

root@build:/home/robot# cat /proc/partitions
major minor  #blocks  name

   8        0  104857600 sda
   8        1     248832 sda1
   8        3       1023 sda3
   8        5   62662656 sda5
  11        0    1048575 sr0
 254        0   54272000 dm-0
 254        1    8388608 dm-1

No luck…or skills. Any help would be great. Thanks.

Best Answer

The partition you have created is only 1MiB in size. This is too small to use as an LVM physical volume. LVM physical extents are 4MiB by default.

Related Topic