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)
fdisk:
#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
parted:
#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|.*|" ]
partprobe:
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
Best Answer
The problem is with the
global_filter
setting inetc/lvm/lvm.conf
that was generated by the Devstack installation.I commented the line out and am now able to use
pvcreate
normally.Thanks to @MichaelHampton for pointing out.