I'm unable to add a new volume (provisioned by a SAN storage) as a PhysicalVolume for the host's LVM volume. Here is the error message:

#sudo pvcreate /dev/sdc1 -v
  Device /dev/sdc1 not found (or ignored by filtering).

OS: Ubuntu 14.04.2 LTS (GNU/Linux 3.16.0-30-generic x86_64)


#sudo fdisk /dev/sdc -l

Disk /dev/sdc: 2198.0 GB, 2197999845376 bytes
237 heads, 20 sectors/track, 905689 cylinders, total 4292968448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disk identifier: 0x00031fdb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  4292968447  2146483200   8e  Linux LVM


#sudo parted /dev/sdc
GNU Parted 2.3
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: HP MSA 2040 SAN (scsi)
Disk /dev/sdc: 2198GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  2198GB  2198GB  primary               lvm

filter (only uncommented lines):

filter = [ "a/.*/" ]
global_filter = [ "a|loop0|", "a|loop1|", "a|sda5|", "r|.*|" ]


sudo partprobe -s
/dev/sda: msdos partitions 1 2 <5>
/dev/sdb: msdos partitions 1 2
/dev/sdc: msdos partitions 1
/dev/sdd: msdos partitions 1
/dev/mapper/devstack--vg-swap_1: loop partitions 1
/dev/mapper/devstack--vg-root: loop partitions 1

What I've tried so far:

  • fdisk /dev/sdc n, p, 1, ENTER 2 times, t, 8e, w
  • (parted) mklabel msdos
  • (parted) mklabel gpt
  • (parted) mklabel loop
  • zero filled the first sector of /dev/sdc
  • zero filled /dev/sdc
  • partprobe
  • partprobe /dev/sdc
  • reboot
  • 1
    You have it filtered out! – Michael Hampton Sep 8 '15 at 11:33
  • @MichaelHampton tried changing it to filter = [ "a/none/" ] which shoudn't match any volume, but the result is still the same. – weeix Sep 8 '15 at 11:53
  • No, you filtered it in the global_filter! – Michael Hampton Sep 8 '15 at 12:00
  • @MichaelHampton OK, I get it, so it was the global_filter line which was generated by devstack. I commented it out and I'm able to add a new PV now. Thanks for pointing it out :) – weeix Sep 8 '15 at 12:07
  • 1
    If you'd like to explain the cause of the problem and its solution, in an answer, it will assist future visitors in solving the problem for themselves. – womble Sep 8 '15 at 19:05

The problem is with the global_filter setting in etc/lvm/lvm.conf that was generated by the Devstack installation.

I commented the line out and am now able to use pvcreate normally.

 #global_filter = [ "a|loop0|", "a|loop1|", "a|sda5|", "r|.*|" ]  # from devstack

Thanks to @MichaelHampton for pointing out.

  • That's a very strange thing for Devstack to do. Then again, it's not meant for production use. For a serious installation you should use a production-oriented distribution of OpenStack, such as RDO. – Michael Hampton Sep 10 '15 at 3:28
  • Came across a similar problem using openstack-ansible; thanks very much for the pointer! – sxc731 Jul 26 '17 at 12:42

Rather than commenting out the entire line, it is possible to add the disk partitions you want to add - in my case, I also wanted to add /dev/sdc1, so changed the line to the following:

global_filter = [ "a|loop0|", "a|loop1|", "a|sda5|", "a|sdb5|", "a|sdc1|", "r|.*|" ]  # from devstack

After that, the pvcreate command worked fine. No reboot required.

Thanks for the original post and answers, though - without that information I would still be trying to figure out what was going on.


I had a similar problem on Debian 8

> lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.7 (jessie)
Release:        8.7
Codename:       jessie

> vgextend vg_data /dev/sdc
  Device /dev/sdc not found (or ignored by filtering).
  Unable to add physical volume '/dev/sdc' to volume group 'vg_data'.

Difference to the Opening Post was that my global_filter was commented out on default with no content inside so I left it as is.

# global_filter = []

There are 3 volume groups on this system, 2 created with the installation. vg_data was created afterwards from sdd (same Controller as sdc below) with no errors and entire disk as RAW.

I finally went with the following steps:

> parted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) mklabel gpt
Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes

(parted) mkpart primary ext4 1049kB 6000GB
(parted) p
Model: AMCC 9650SE-12M DISK (scsi)
Disk /dev/sdc: 6000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  6000GB  6000GB  ext4         primary

(parted) quit
Information: You may need to update /etc/fstab.

> partprobe /dev/sdc
> partprobe /dev/sdc1

I had hoped that lvm would overwrite the partition and use the disk as RAW but...

> vgextend vg_data /dev/sdc
  Device /dev/sdc not found (or ignored by filtering).
  Unable to add physical volume '/dev/sdc' to volume group 'vg_data'.

So in the end I used the partition and ...

> vgextend vg_data /dev/sdc1
  Physical volume "/dev/sdc1" successfully created
  Volume group "vg_data" successfully extended

yay vg_data was finally extended


Another possible reason: there might be a RAID superblock on the device. If so (check with file -s /dev/sdXN if you don't want to install mdadm just for that), zero it out with dd if=/dev/zero bs=1k count=10 of=/dev/sdXN.

No, the --force option to pvcreate is not sufficient. I'm going to file a bug about that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.