Troubleshooting “Device /dev/sdb1 not found (or ignored by filtering)” Error When Creating Physical Volumes on GPT-partitioned Disks


2 views

When working with large storage devices in Linux, particularly those exceeding 2TB, the GPT partitioning scheme becomes necessary. The error message "Device /dev/sdb1 not found (or ignored by filtering)" typically occurs when attempting to create physical volumes on such devices using traditional tools.

From your output, we can see several important details:

Disk /dev/sdb: 19966.2 GB
Partition Table: gpt
WARNING: fdisk doesn't support GPT

The key problem here stems from using fdisk with a GPT-partitioned disk. While the partition is technically there (shown as /dev/sdb1 with type ee), the tools interaction isn't working as expected.

For GPT disks, we should use parted or gdisk instead of fdisk. Here's how to properly examine and prepare your disk:

# Install gdisk if needed (CentOS 6)
yum install gdisk -y

# Examine the disk with proper GPT-aware tools
gdisk -l /dev/sdb

# Or using parted
parted /dev/sdb print

There are two approaches to handle this situation:

# Method 1: Use the entire disk (without partition table)
pvcreate /dev/sdb

# Method 2: Properly create a partition first using GPT-aware tools
parted /dev/sdb mklabel gpt
parted /dev/sdb mkpart primary 0% 100%
parted /dev/sdb set 1 lvm on
pvcreate /dev/sdb1

While your filter configuration appears correct, let's verify it's properly applied:

# Check current filter configuration
lvmconfig --type full | grep filter

# Example output should show:
filter = [ "a/.*/" ]

For very large disks (like your 20TB disk), you might consider using the entire disk without partitioning:

# Wipe existing partition table (CAUTION: destructive operation!)
wipefs -a /dev/sdb

# Create PV directly on disk
pvcreate /dev/sdb
  • Partition not properly aligned: Use parted with percentage-based allocation
  • Partition type not set: Ensure set 1 lvm on is executed in parted
  • Device not rescanned: Run partprobe after partition changes

Here's a complete workflow for your specific case:

# First, clean existing GPT data (if needed)
sgdisk -Z /dev/sdb

# Create new GPT partition table and single partition
sgdisk -n 1:0:0 -t 1:8e00 /dev/sdb

# Inform the OS about partition table changes
partprobe /dev/sdb

# Verify partition exists
ls -l /dev/sdb*

# Create physical volume
pvcreate /dev/sdb1

# Verify PV creation
pvs
pvdisplay

When working with large storage devices (>2TB) in Linux, you'll likely encounter GPT partitioning. The error occurs when trying to create an LVM physical volume on a GPT-partitioned disk using traditional tools.


# Typical error encountered
[root@server ~]# pvcreate /dev/sdb1
Device /dev/sdb1 not found (or ignored by filtering).

The key problem here is using fdisk which doesn't properly support GPT. As shown in your output:


WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! 
The util fdisk doesn't support GPT. Use GNU Parted.

For GPT-formatted disks, you should use parted or gdisk instead:


# Install gdisk if needed (CentOS/RHEL)
yum install gdisk -y

# View GPT partition table properly
gdisk -l /dev/sdb

# Or using parted
parted /dev/sdb print

Here's the correct sequence for initializing a GPT partition as LVM PV:


# First, verify the partition exists
ls -l /dev/sdb*

# If partition exists but not visible to LVM, try:
partprobe /dev/sdb

# Then create PV (either whole disk or partition)
pvcreate /dev/sdb  # For entire disk
pvcreate /dev/sdb1 # For specific partition

# Verify creation
pvs
pvdisplay

Your LVM filter configuration appears correct (accepting all devices), but you might need to:


# Refresh LVM cache
vgscan --cache

# Check active filters
lvmconfig --type full | grep filter

# Alternative PV creation with explicit filter
pvcreate /dev/sdb1 --config 'devices { filter = ["a|/dev/sdb1|", "r/.*/"] }'

Here's a full example from partitioning to volume group creation:


# 1. Partition using parted
parted /dev/sdb mklabel gpt
parted /dev/sdb mkpart primary 0% 100%

# 2. Verify partition
parted /dev/sdb print

# 3. Create physical volume
pvcreate /dev/sdb1

# 4. Create volume group
vgcreate vg_data /dev/sdb1

# 5. Create logical volume
lvcreate -L 10T -n lv_storage vg_data

# 6. Format and mount
mkfs.xfs /dev/vg_data/lv_storage
mkdir /data
mount /dev/vg_data/lv_storage /data

If issues persist:


# Check kernel messages
dmesg | grep sdb

# Verify device existence
lsblk -f /dev/sdb

# Check partition alignment
parted /dev/sdb align-check optimal 1

# Try alternative naming
pvcreate /dev/disk/by-id/ata-YOUR_DISK_ID-part1