Bug 772629

Summary: cannot remount encrypted device if removed w/o unmount
Product: Red Hat Enterprise Linux 6 Reporter: Vladimir Benes <vbenes>
Component: udisksAssignee: David Zeuthen <davidz>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.3CC: mclasen, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-10 15:31:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vladimir Benes 2012-01-09 13:29:22 UTC
Description of problem:
I have formatted flash disk with encrypted partition.. mounted it.. removed the drive w/o unmounting it and now I cannot remount any more. The first issue is that desktop icon stays on the desktop (just its lock disappears) saying 4.2 GB encrypted. I can unmount it. When I reinsert my flash drive nautilus asks for password but this eeror is shown after inserting correct password.

Unable to mount 4.2 GB Encrypted
Error unlocking device: cryptsetup exited with exit code 5: Device udisks-luks-uuid-e6e0b696-5842-4a7b-88ae-3390c1d9f071-uid1000 already exists.   

Version-Release number of selected component (if applicable):
nautilus-2.28.4-18.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.format usb device as encrypted device with fat
2.mount it
3.remove it w/o unmounting
4.remount it
  
Actual results:
error shown that the device already exists

Expected results:
should be mounted normally

Additional info:

Comment 1 Tomáš Bžatek 2012-01-10 14:32:23 UTC
Looks to be more a udisks issue.

Comment 2 David Zeuthen 2012-01-10 15:31:05 UTC
(In reply to comment #0)
> Description of problem:
> I have formatted flash disk with encrypted partition.. mounted it.. removed the
> drive w/o unmounting it and now I cannot remount any more. 

Don't remove the drive without unmounting or locking it, we do not support it.

Note: while parts of udisks will try to clean up after you if you removed devices that you've activated (e.g. mounted or unlocked) through udisks, there are enough problems kernel side with this. So we just don't support it.