PowerPath/Linux: "ERROR: can not use a target device that is in use" which trying to rename a device to emcpowerX
Summary: PowerPath/Linux: "ERROR: can not use a target device that is in use" which trying to rename a device to emcpowerX
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
The old device associated with pseudo name emcpowerX was removed and when a new device named emcpowerY (emcpowerb in this case) was attempted to rename to emcpowerX, it throws the error "ERROR: can not use a target device that is in use".
Cause
What seemed to be the issue in this case:
--The old device which was associated with emcpowerX was removed from the backend without removing the device from PowerPath level first.
--The PowerPath v7.3 was installed post uninstallation of v7.2 without performing cleanup of the older instance of PowerPath.
Even after trying to release the pseudo and multiple reboots, the emcpowerX entry was still getting listed under usedpseudos:
[root@xxxxx ~]# emcpadm getusedpseudos
PowerPath pseudo device names in use:
Pseudo Device Name Major# Minor#
emcpowerX 120 0
emcpowerb 120 16
emcpowerc 120 32
[root@xxxxxx ~]# emcpadm renamepseudo -s emcpowerb -t emcpowerX
<ERROR: can not use a target device that is in use>
--The old device which was associated with emcpowerX was removed from the backend without removing the device from PowerPath level first.
--The PowerPath v7.3 was installed post uninstallation of v7.2 without performing cleanup of the older instance of PowerPath.
Even after trying to release the pseudo and multiple reboots, the emcpowerX entry was still getting listed under usedpseudos:
[root@xxxxx ~]# emcpadm getusedpseudos
PowerPath pseudo device names in use:
Pseudo Device Name Major# Minor#
emcpowerX 120 0
emcpowerb 120 16
emcpowerc 120 32
[root@xxxxxx ~]# emcpadm renamepseudo -s emcpowerb -t emcpowerX
<ERROR: can not use a target device that is in use>
Resolution
In this case, manually cleaning up the PowerPath Database resolved the issue and the device could be renamed as per required:
1) Make sure all I/O is stopped and all of the file systems to the array are unmounted.
2) Stop PowerPath.
3) Remove the old config files /etc/emcp_devicesDB.dat and /etc/emcp_devicesDB.idx
4) Remove the /etc/emc/archive directory.
5) Start PowerPath.
6) Save the new configuration (powermt save).
NOTE: It's always recommended to remove the device from the PowerPath level first and then from the backend to avoid any kind of issues like this. Also, its always recommended to cleanup the older install instance in order to avoid any unexpected issues.
Affected Products
PowerPath for LinuxArticle Properties
Article Number: 000189392
Article Type: Solution
Last Modified: 27 Aug 2022
Version: 5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.