Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detach script does not remove device from /dev/mapper #24

Open
lihop opened this issue Feb 21, 2019 · 0 comments
Open

Detach script does not remove device from /dev/mapper #24

lihop opened this issue Feb 21, 2019 · 0 comments

Comments

@lihop
Copy link

lihop commented Feb 21, 2019

I am currently running these scripts on NixOS. When I run the detach script the device is not removed from /dev/mapper.

Expected:

# packet-block-storage-attach volume-652b2041
target has been set to: volume-652b2041
...
Block device /dev/mapper/volume-652b2041 is available for use

# ls /dev/mapper
control  volume-652b2041

# packet-block-storage-detach volume-652b2041
Logging out iqn.2013-05.com.daterainc:tc:01:sn:3e5dbe3a64ba5d89 on 10.144.35.150
...

# ls /dev/mapper
control

Actual:

# packet-block-storage-attach volume-652b2041
target has been set to: volume-652b2041
...
Block device /dev/mapper/volume-652b2041 is available for use

# ls /dev/mapper
control  volume-652b2041

# packet-block-storage-detach volume-652b2041
Logging out iqn.2013-05.com.daterainc:tc:01:sn:3e5dbe3a64ba5d89 on 10.144.35.150
...

# ls /dev/mapper
control volume-652b2041

The logs for multipathd.service show that it is trying to remove the map before the second device has been removed so the map is still in use.

Feb 21 06:32:34 machine multipathd[12098]: sdb: remove path (uevent)
Feb 21 06:32:34 machine multipathd[12098]: volume-652b2041: load table [0 20971520 multipath 1 retain_attached_hw_handler 1 alua 1 1 round-robin 0 1 1 8:32 50]
Feb 21 06:32:34 machine multipathd[12098]: sdb [8:16]: path removed from map volume-652b2041
Feb 21 06:32:34 machine multipathd[12098]: sdc: remove path (uevent)
Feb 21 06:32:34 machine multipathd[12098]: volume-652b2041: map in use
Feb 21 06:32:34 machine multipathd[12098]: volume-652b2041: can't flush
Feb 21 06:32:34 machine multipathd[12098]: volume-652b2041: load table [0 20971520 multipath 1 retain_attached_hw_handler 1 alua 0 0]
Feb 21 06:32:34 machine multipathd[12098]: sdc [8:32]: path removed from map volume-652b2041
lihop added a commit to lihop/packet-block-storage that referenced this issue Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant