From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A176D1382C5 for ; Tue, 15 Jun 2021 14:56:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 945C0E087C; Tue, 15 Jun 2021 14:56:09 +0000 (UTC) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0E32CE086C for ; Tue, 15 Jun 2021 14:56:08 +0000 (UTC) Received: by mail-qt1-f171.google.com with SMTP id o20so11399255qtr.8 for ; Tue, 15 Jun 2021 07:56:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=dgpthVqDFGDQ0Nqcvno0POrH9QxWZwFDUeE7B2QadTQ=; b=VZwhtC+WbOwA3O4JItccOvvOPQiHgAnpUpMCixhv4pvAa8/n3DoHteNPwsptbrKmGo O/GrFDM2inwCcJoKa+W3PWvxzPnMuqGzHXIMh8WEtpqDf8ddKVOYpYqjdQlzAURwfUex nB1eoWdiEAZ8jusf2mY5kKWJWhibTur09VbJwMUZXbVWOgePhYo3CzqOlhHtUzcuiR0w j8e3H8l0cCF24YbwtILIVZYb9tzOqa25fv7FIb5AMhHYmVIX3bchfro0fEQQdYAvndOc dJ2eM/Q2VcAr2fjocRKTp1UHslG2JhqDwshzBJGShUdeS5BVBDDb2BYXu8LNL6AlCHV1 7CAw== X-Gm-Message-State: AOAM532sYYUbk0PuFaGwcNki3WfvdCHA19z0dLtw429/dMTF1KDtLkCI k/FlxfLpj0C8ik2lIWVbPq0Ye12dbJoAcv26 X-Google-Smtp-Source: ABdhPJxPRkFeZZ91ufIGNojkhzWwql2TU3w8jr5r3k+7q+x7HcJmx+9iXDZKoTXJAKmdM5I83RydPw== X-Received: by 2002:ac8:7cb7:: with SMTP id z23mr37296qtv.100.1623768967690; Tue, 15 Jun 2021 07:56:07 -0700 (PDT) Received: from [192.168.1.15] (c-76-23-130-96.hsd1.ct.comcast.net. [76.23.130.96]) by smtp.gmail.com with ESMTPSA id g24sm11575424qts.60.2021.06.15.07.56.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Jun 2021 07:56:07 -0700 (PDT) Subject: Re: [gentoo-user] cryptsetup close and device in use when it is not To: gentoo-user@lists.gentoo.org References: <70a1b488-c49e-6a94-a9a9-37eeb2ff4399@gmail.com> From: Jack Message-ID: <9c9d5923-dccb-34d5-0f3b-16e07f337009@users.sourceforge.net> Date: Tue, 15 Jun 2021 10:52:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Archives-Salt: e059e943-ea0b-4efe-b526-caab7250164f X-Archives-Hash: b47f9d3a662a903909dffd823699a530 On 6/15/21 10:21 AM, Dale wrote: > Ramon Fischer wrote: >> Hello Dale, >> >> this also happens to me sometimes and the culprit was an open process >> still accessing the hard drive. Maybe you can solve it like this: >> >>    $ lsof /mnt/8tb >>    zsh       8390 root  cwd    DIR  253,2      4096 27787265 /mnt/8tb >>    $ kill 8390 >>    $ lsof /mnt/8tb >> >> After that, you should be able to close the drive via "cryptsetup". >> >> -Ramon >> >> On 14/06/2021 06:50, Dale wrote: >>> root@fireball / # cryptsetup close 8tb >>> Device 8tb is still in use. >>> root@fireball / # mount | grep 8tb >>> root@fireball / # > I've tried lsof before, for both mount point and device, it shows > nothing open.  It's weird. > > When this happened last night, just before I posted, I let the drive sit > there while I was doing updates.  Later on, I tried to close it again > and it closed just fine.  I hadn't done anything except let it sit > there.  While I was glad it closed, I wonder why it did it.  Did udev > finally catch up to the state of the drive?  Did some other device > update and allow it to close? > > This is weird.  Everything says it is ready to be closed but it thinks > something is open.  I'm not sure what to point too for the problem.  Yet > anyway. > > Thanks for the tip.  It was worth mentioning. > > Dale Is it possible it was still syncing cache out to the physical drive?  I wonder if iotop would show any activity for that drive if that's the case? Jack