• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“Device /dev/mappper/mpath25 Not Found (or Ignored By Filtering)” – error while creating physical volume with pvcreate

By admin

The Problem

When trying to create physical volume , getting the below error

error:

# pvcreate /dev/mappper/mpath25
Device /dev/mappper/mpath25 not found (or ignored by filtering).

The issue can be reproduced at will with the following step:

# pvcreate /dev/mappper/mpath25

The Solution

Upon checking it was found that start sector was not zeroed out.

# pvcreate /dev/mappper/mpath25
Device /dev/mappper/mpath25 not found (or ignored by filtering).
# fdisk -l /dev/mapper/mpath25
Disk /dev/mapper/mpath25 doesn't contain a valid partition table

This shows that there was no pratition present on the disk. You can run the pvcreate command with verbose option “-vvv” to get more details on the error:

# pvcreate -vvv /dev/mapper/mpath25
Processing: pvcreate -vvv /dev/mapper/mpath25
O_DIRECT will be used
Setting global/locking_type to 1
Setting global/wait_for_locks to 1
File-based locking selected.
Setting global/locking_dir to /var/lock/lvm
metadata/pvmetadataignore not found in config: defaulting to n
metadata/pvmetadatasize not found in config: defaulting to 255
metadata/pvmetadatacopies not found in config: defaulting to 1
Locking /var/lock/lvm/P_orphans WB
_do_flock /var/lock/lvm/P_orphans:aux WB
_do_flock /var/lock/lvm/P_orphans WB
_undo_flock /var/lock/lvm/P_orphans:aux
dm version OF [16384]
dm status (253:11) OF [16384]
/dev/mapper/mpath25: New preferred name      ### indicates that it can find the device
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: size is 629145600 sectors
Closed /dev/mapper/mpath25
/dev/mapper/mpath25: size is 629145600 sectors
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: block size is 4096 bytes
Closed /dev/mapper/mpath25
Using /dev/mapper/mpath25
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: block size is 4096 bytes
/dev/mapper/mpath25: No label detected
Closed /dev/mapper/mpath25
dm status (253:11) OF [16384]
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: size is 629145600 sectors
Closed /dev/mapper/mpath25
/dev/mapper/mpath25: size is 629145600 sectors
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: block size is 4096 bytes
Closed /dev/mapper/mpath25
Using /dev/mapper/mpath25
Opened /dev/mapper/mpath25 RW O_EXCL O_DIRECT
Closed /dev/mapper/mpath25
/dev/mapper/mpath25: size is 629145600 sectors
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: block size is 4096 bytes
Closed /dev/mapper/mpath25
/dev/mapper/mpath25: size is 629145600 sectors
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: block size is 4096 bytes
Closed /dev/mapper/mpath25
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: block size is 4096 bytes
Closed /dev/mapper/mpath25
dm status (253:11) OF [16384]
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: size is 629145600 sectors
Closed /dev/mapper/mpath25
/dev/mapper/mpath25: size is 629145600 sectors
Opened /dev/mapper/mpath25 RO O_DIRECT
/dev/mapper/mpath25: block size is 4096 bytes
Closed /dev/mapper/mpath25
Using /dev/mapper/mpath25
/dev/mapper/mpath25: size is 629145600 sectors
Setting devices/data_alignment to 0
Setting devices/default_data_alignment to 0
/dev/mapper/mpath25: Setting PE alignment to 128 sectors.
/dev/mapper/mpath25: Setting PE alignment offset to 0 sectors.
Opened /dev/mapper/mpath25 RW O_DIRECT
Wiping /dev/mapper/mpath25 at sector 8 length 8 sectors
/dev/mapper/mpath25: block size is 4096 bytes
Closed /dev/mapper/mpath25
Set up physical volume for "/dev/mapper/mpath25" with 629145600 available sectors
Scanning for labels to wipe from /dev/mapper/mpath25
Opened /dev/mapper/mpath25 RW O_DIRECT
/dev/mapper/mpath25: block size is 4096 bytes
Closed /dev/mapper/mpath25
Zeroing start of device /dev/mapper/mpath25
Opened /dev/mapper/mpath25 RW O_DIRECT
Wiping /dev/mapper/mpath25 at sector 0 length 4 sectors
/dev/mapper/mpath25: block

Last entry in the debug output indicating that the cause is in the zeroing first sector area.

To implement the solution, please execute the following steps:

1. For entire disk devices only the partition table must be erased, which will effectively destroy all data on that disk. This can be done by zeroing the first sector with:

# dd if=/dev/zero of= bs=512 count=1.

2. Perform pvcreate to create the physical volume:

# pvcreate [device]

3. Migrate the solution as appropriate to other environments.

Filed Under: CentOS/RHEL, CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to use command redirection under Linux
  2. CentOS / RHEL : How to disable root login or root access on a system
  3. CentOS / RHEL : Move a Physical Volume from an existing Volume Group to another Volume Group
  4. How to disable IPv6 on CentOS / RHEL 7
  5. How To Check a Disk for Bad Blocks or Disk Errors on CentOS / RHEL
  6. Understanding chroot Jail
  7. Linux / UNIX : How to find files which has SUID/SGID set
  8. Linux OS Service ‘yum-updatesd’
  9. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)
  10. CentOS / RHEL 7 : How to start / Stop or enable / disable Firewalld

You May Also Like

Primary Sidebar

Recent Posts

  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Basics of client connectivity in Oracle Data Guard configuration
  • ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary