Device /dev/sda excluded by a filter.
Getting this?
[root@mdskvm-p06 ~]# pvcreate /dev/sda
Device /dev/sda excluded by a filter.
It's likely because you're running the multipath daemon. So partitions have to be created on the associated multipath devices, not the device names themselves:
[root@mdskvm-p06 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 3.3T 0 disk
`-mpathb 253:4 0 3.3T 0 mpath
sdb 8:16 0 111.8G 0 disk
|-sdb1 8:17 0 500M 0 part /boot
`-sdb2 8:18 0 111.3G 0 part
|-centos-root 253:0 0 50G 0 lvm /
|-centos-swap 253:1 0 4G 0 lvm [SWAP]
`-centos-home 253:2 0 57.2G 0 lvm /home
sdc 8:32 0 4T 0 disk
`-mpatha 253:3 0 4T 0 mpath
sdd 8:48 0 4T 0 disk
`-mpatha 253:3 0 4T 0 mpath
sr0 11:0 1 1024M 0 rom
[root@mdskvm-p06 ~]# pvcreate /dev/sda -vvv 2>&1 | grep -Ei filter
devices/global_filter not found in config: defaulting to global_filter = [ “a|.*/|” ]
Sysfs filter initialised.
Internal filter initialised.
LVM type filter initialised.
Usable device filter initialised (scan_lvs 0).
mpath filter initialised.
Partitioned filter initialised.
MD filter initialised.
Composite filter initialised.
devices/filter not found in config: defaulting to filter = [ “a|.*/|” ]
Regex filter initialised.
Usable device filter initialised (scan_lvs 0).
Composite filter initialised.
Persistent filter initialised.
Composite filter initialised.
filter caching good /dev/sdb2
/dev/sdb2: filter cache using (cached good)
filter caching good /dev/mapper/mpatha
filter caching good /dev/mapper/mpathb
filter caching good /dev/sdb1
/dev/sdb2: filter cache using (cached good)
/dev/sdb2: filter cache using (cached good)
Device /dev/sda excluded by a filter.
[root@mdskvm-p06 ~]#
Create the PV's as follows:
[root@mdskvm-p06 ~]# ls -altri /dev/mapper/mpath*
36340 lrwxrwxrwx. 1 root root 7 Dec 25 2013 /dev/mapper/mpathb -> ../dm-4
630 lrwxrwxrwx. 1 root root 7 Dec 25 2013 /dev/mapper/mpatha -> ../dm-3
[root@mdskvm-p06 ~]# fdisk -l | grep Disk
Disk /dev/sda: 3600.6 GB, 3600557236224 bytes, 7032338352 sectors
Disk /dev/sdb: 120.0 GB, 120034123776 bytes, 234441648 sectors
Disk label type: dos
Disk identifier: 0x000ddc62
Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Disk /dev/mapper/centos-swap: 4294 MB, 4294967296 bytes, 8388608 sectors
Disk /dev/mapper/centos-home: 61.5 GB, 61459136512 bytes, 120037376 sectors
Disk /dev/sdc: 4398.0 GB, 4398046511104 bytes, 8589934592 sectors
Disk /dev/mapper/mpatha: 4398.0 GB, 4398046511104 bytes, 8589934592 sectors
Disk /dev/mapper/mpathb: 3600.6 GB, 3600557236224 bytes, 7032338352 sectors
Disk /dev/sdd: 4398.0 GB, 4398046511104 bytes, 8589934592 sectors
[root@mdskvm-p06 ~]# multipath -ll
mpathb (3600508b1001c3dfb8e849ba5979f7950) dm-4 HP ,LOGICAL VOLUME
size=3.3T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
`- 0:0:0:0 sda 8:0 active ready running
mpatha (36001405cde6c12381bf467d924692d4e) dm-3 SAN-STOR ,FILEIO
size=4.0T features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 5:0:1:0 sdc 8:32 active ready running
`-+- policy='service-time 0' prio=1 status=enabled
`- 1:0:0:0 sdd 8:48 active ready running
[root@mdskvm-p06 ~]#
[root@mdskvm-p06 ~]#
[root@mdskvm-p06 ~]# pvcreate /dev/mapper/mpathb
Physical volume "/dev/mapper/mpathb" successfully created.
[root@mdskvm-p06 ~]# pvcreate /dev/mapper/mpatha
WARNING: xfs signature detected on /dev/mapper/mpatha at offset 0. Wipe it? [y/n]: n
Aborted wiping of xfs.
1 existing signature left on the device.
[root@mdskvm-p06 ~]# lsblk /dev/mapper/mpatha
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mpatha 253:3 0 4T 0 mpath
[root@mdskvm-p06 ~]# blkid /dev/mapper/mpatha
/dev/mapper/mpatha: UUID="4c128a7f-49fa-42a9-b829-27979c4aad6f" TYPE="xfs"
[root@mdskvm-p06 ~]# df -h /dev/mapper/mpatha
Filesystem Size Used Avail Use% Mounted on
devtmpfs 126G 0 126G 0% /dev
[root@mdskvm-p06 ~]#
[root@mdskvm-p06 ~]#
[root@mdskvm-p06 ~]#
[root@mdskvm-p06 ~]# mount|grep mpatha
[root@mdskvm-p06 ~]# pvcreate /dev/mapper/mpatha
WARNING: xfs signature detected on /dev/mapper/mpatha at offset 0. Wipe it? [y/n]: y
Wiping xfs signature on /dev/mapper/mpatha.
Physical volume "/dev/mapper/mpatha" successfully created.
[root@mdskvm-p06 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/mpatha lvm2 — 4.00t 4.00t
/dev/mapper/mpathb lvm2 — 3.27t 3.27t
/dev/sdb2 centos lvm2 a– <111.30g 60.00m
[root@mdskvm-p06 ~]#
Cheers,
TK