pvcreate --restorefile fails "/dev/sdx device not found or ignored by filtering" in XenServer

pvcreate --restorefile fails "/dev/sdx device not found or ignored by filtering" in XenServer

book

Article ID: CTX217669

calendar_today

Updated On:

Description

When trying to restore the lvm metadata on a Physical volume from backup using the command pvcreate --restorefile, it is failing with the error

/dev/sdx device not found

Resolution

  1. Check if actually the device exist under /dev . If not present It from the backend storage and rescan the HBA adapter
  2.  If the lun is present in /dev, check if it is getting ignored by the lvm filter parameter in /etc/lvm/lvm.conf

   3.  if not, run pvscan -vvv command to see why the device is getting ignored by the lvm . In this case we could see the device was getting ignored saying "Skipping: Partition table signature found"

   4.    Remove the partition table structure by dd out the first 1 MB         

              # dd if=/dev/zero of=/dev/sdb bs=1M count=1 


Problem Cause

Partition table on the device was causing the device to be ignored during the pvscan