Operating System - Linux
1753444 Members
4678 Online
108794 Solutions
New Discussion

/dev/emcpowerax1: open failed: No such device

 
Jdamian
Respected Contributor

/dev/emcpowerax1: open failed: No such device

Hi

I removed an EMC LUN (/dev/emcpowerax) from a volume group using pvreduce and wiped out its header by means of pvremove.

I removed the EMC LUN from PowerPath:

powermt remove dev=/dev/emcpowerax

Then both vgdisplay and pvs commands shows the warning message:

/dev/emcpowerax1: open failed: No such device

Why does LVM still recall that disk?
Did I miss an intermediate step?

Thanx in advance
1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: /dev/emcpowerax1: open failed: No such device

It would have been important to know which version of Linux you're using.

I assume you're using at least something with a 2.6.* series kernel, mainly because using any kind of SAN with a 2.4.* or older kernel is much more inconvenient.

> /dev/emcpowerax1: open failed: No such device

Does /sys/block/emcpowerax still exist?

If it exists, then the "powermt remove" command only changed PowerPath configuration: the rest of the OS kernel is still unaware that the device is gone for good.

To tell the kernel that a disk has been removed, use a command like:

echo 1 > /sys/block//device/delete

In your specific case, the command line would be:

echo 1 > /sys/block/emcpowerax/device/delete

If the /sys/block/emcpowerax no longer exists, then the error message was produced because the LVM device cache still contains information that /dev/emcpowerax1 used to exist.

Solution: delete the cache file at /etc/lvm/cache/.cache, run "vgscan" to refresh the cache.

rm /etc/lvm/cache/.cache
vgscan

(Note: in HP-UX LVM, "vgscan" is a scary command, and it should be used only if really necessary. In Linux, it is safe to use at any time.)

Ideally, PowerPath should have signaled the device deletion to the kernel (equivalent to "echo 1 > /sys/block/emcpowerax/device/delete"), which should have triggered an udev event regarding the removal of a disk device, which should have caused vgscan to be run automatically. As this didn't happen, I suspect you may be using either an old version of PowerPath, or an older Linux distribution with a relatively immature set of udev rules.

MK
MK