Ramon Fischer wrote:
> Hi Dale,
>
>>   So, something says it is busy but eventually
>> releases it if left alone for a while.  I'd like to know what it is and
>> if it is really in use or not.  Thing is, I can't find a way to know
>> what it is that is using it.  The dmsetup command shows it is in use but
>> no way to know what is using it.
> I could reproduce this issue by killing my desktop process, unmounting
> the home partition and playing some "kill process" bingo. I could
> backtrace it to one unkillable process "kcryptd":
>
>    1. Kill "awesomewm": <CTRL + ALT> + Backspace
>    2. Kill other processes accessing "/home/"
>    3. umount /home
>    4. cryptsetup close crypthome
>    Device crypthome is still in use
>    5. dmsetup info /dev/mapper/crypthome
>    Name:              crypthome
>    State:             ACTIVE
>    Read Ahead:        256
>    Tables present:    LIVE
>    Open count:        1
>    Event number:      0
>    Major, minor:      253, 1
>    Number of targets: 1
>    UUID: CRYPT-LUKS2-<some_uuid>-crypthome
>    6. Kill any unnecessary process and try "cryptsetup close crypthome"
>    7. Search for major, minor: ps aux | grep "253:1"
>    root       150  0.2  0.0      0     0 ?        I    15:21   0:02
>    [kworker/u16:5-kcryptd/253:1]
>    8. Does not work: kill 150
>    9. Does not work and could be dangerous: kill -9 150
>
> So, there was still one "kcryptd" process left, accessing the hard
> drive, but I found no way to kill it.
>
> Maybe this could be helpful?
>
> -Ramon
>


Well, it still does it but there is no rhyme or reason to when it says
in use and when it closes when asked too.  I to saw a process kcryptd
but not sure what triggers it. I didn't try to kill it since I'm pretty
sure it is a kernel process.  I build everything into my kernel, no
modules.  Sort of scared to mess with it. 

So, sometimes it works as it should, sometimes not.  When it doesn't, if
I leave it alone for a while then try again, it works.  I also checked
to be sure SMART wasn't doing something but if it is, I couldn't see
it.  Since it is a removable drive, I don't have it set to do anything
either. 

I guess I'll just have to wait on it to finish whatever it is doing to
close it when it gets stubborn.  Maybe this is a bug, maybe it has a
really good reason for not closing.  Who knows.  :/

Thanks to all for the help.  We gave it a good try.

Dale

:-)  :-)

Reply via email to