Gentoo Archives: gentoo-user

From: Remy Blank <remy.blank@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: cryptsetup close and device in use when it is not
Date: Tue, 15 Jun 2021 17:48:35
Message-Id: saap56$fbj$1@ciao.gmane.io
In Reply to: Re: [gentoo-user] cryptsetup close and device in use when it is not by Dale
1 Dale wrote on 15/06/2021 16:21:
2 > Ramon Fischer wrote:
3 >> Hello Dale,
4 >>
5 >> this also happens to me sometimes and the culprit was an open process
6 >> still accessing the hard drive. Maybe you can solve it like this:
7 >>
8 >>    $ lsof /mnt/8tb
9 >>    zsh       8390 root  cwd    DIR  253,2      4096 27787265 /mnt/8tb
10 >>    $ kill 8390
11 >>    $ lsof /mnt/8tb
12 >>
13 >> After that, you should be able to close the drive via "cryptsetup".
14 >>
15 >> -Ramon
16 >>
17 >
18 > I've tried lsof before, for both mount point and device, it shows
19 > nothing open.  It's weird.
20
21 When this happens here, it's because I accessed the drive over NFS. The NFS server sometimes
22 keeps mount points active, and they don't show up in the output of lsof probably because the NFS
23 server is in-kernel, so there are no processes associated with it. Restarting the NFS server
24 allows unmounting.
25
26 -- Remy