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

Fixed 'Cannot remove device mapper handle ...' error message. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erobhal
Copy link

@erobhal erobhal commented Sep 7, 2016

In luks.c (row 223) the function isLuksMapperAvailable is
called with the full path of the device mapper
(including /dev/mapper/). In isLuksMapperAvailable a
'cryptsetup status' is performed with that input.
However, if you call 'cryptsetup status' with the full
path instead of the actual name of the device mapper it
will (at least on RHEL 6) return 1 (wrong parameters) as
error code, not 4 (wrong device specified). And the
user will receive the "Cannot remove device mapper handle
..." error message. The fix is to strip the
/dev/mapper part and only run 'cryptsetup status' using
the basename.

In luks.c (row 223) the function isLuksMapperAvailable is
called with the full path of the device mapper
(including /dev/mapper/). In isLuksMapperAvailable a
'cryptsetup status' is performed with that input.
However, if you call 'cryptsetup status' with the full
path instead of the actual name of the device mapper it
will (at least on RHEL 6) return 1 (wrong parameters) as
error code, not 4 (wrong device specified). And the
user will receive the "Cannot remove device mapper handle
..." error message. The fix is to strip the
/dev/mapper part and only run 'cryptsetup status' using
the basename.
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

Successfully merging this pull request may close these issues.

1 participant