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 A48361382C5 for ; Tue, 15 Jun 2021 19:04:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 611A1E08ED; Tue, 15 Jun 2021 19:04:07 +0000 (UTC) Received: from EUR06-VI1-obe.outbound.protection.outlook.com (mail-vi1eur06olkn2096.outbound.protection.outlook.com [40.92.17.96]) (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 578B1E08A0 for ; Tue, 15 Jun 2021 19:04:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e6KvYXSUN/fMZKPXLxOOvJz5lzVoXeZJ/nbt7tv6/ELy+QkthXtosCpInlOAhdIUT+v3z8X7N0FfD+kOokQEURyzp83f9EBpoaiLX4Tl2koCTsE+d3sjBaci6EFTyY9DSnlvOYqBfIlYiFaXWTvm1OqSnXoaFG0s6VXYJP03uITy6ndauUr8N/2gnsxkJuQ6+aQVQSBudZE06/NJBadn4g8y2JRhrfZMYut+fBXIowVjKVL5fF2RsBJXqdOQVNvH11mefTjNGsODSaJ0w/j8rzEYhL7avWi3tzr3MbSdgWw+PQo/V/v67loBOiOxsClBff6mWlpRrC8t399ighnCjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YbJrU97gZpF7Nhgu1xLgcb0e84PcksE6YgyFgP1TSSY=; b=ayA7beS14vLe8/S7r3bxd7aoYB26YK2mEnwJhHyavsJhfniqcAabwmq/Te15nTNwLCi9Cg5/jMr/G+qc+Co5cfROoaSYw18J0IpFq/u/GKdT6HGfiIfdN2OHwIAzzvbIv5wF0RyKA7vQsPn9xWxFgn9cP2YmTCm91h5ECtVUddCzcbp8Y7wTAtndKL10hiLBGd5Qk4Ju8YDg+LG5Tn3q9sIZ0S1LFEyP0gWSnrTr10SX4w5k/xYclqVYqD5TjdJKwGOzXkO19DPbnpGKs+EOiwfdCvYywgNFtiVegZxGBQAb5qTc8g6CovJ5hMlvWi89UWLbah+gLT1gOBv1BOwHQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DB8EUR06FT053.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::4a) by DB8EUR06HT050.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::302) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Tue, 15 Jun 2021 19:04:04 +0000 Received: from AM6PR10MB2440.EURPRD10.PROD.OUTLOOK.COM (2a01:111:e400:fc35::52) by DB8EUR06FT053.mail.protection.outlook.com (2a01:111:e400:fc35::457) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 15 Jun 2021 19:04:04 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:FDDBEDB09CE3A9A0ED7C609E1704EDFEA6B813F0286EC38E27634F242E3B8F15;UpperCasedChecksum:6F1FE8300E5CF99FBE46DB7967BE7BDF030CD0FD5F2E87B5EBEB0F8E9A6CF627;SizeAsReceived:9005;Count:45 Received: from AM6PR10MB2440.EURPRD10.PROD.OUTLOOK.COM ([fe80::e581:feb4:4485:2e4f]) by AM6PR10MB2440.EURPRD10.PROD.OUTLOOK.COM ([fe80::e581:feb4:4485:2e4f%7]) with mapi id 15.20.4219.025; Tue, 15 Jun 2021 19:04:04 +0000 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> <9c9d5923-dccb-34d5-0f3b-16e07f337009@users.sourceforge.net> <649753f7-5dcd-1842-875d-d637ef754b9f@gmail.com> From: Ramon Fischer Message-ID: Date: Tue, 15 Jun 2021 21:04:01 +0200 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) In-Reply-To: <649753f7-5dcd-1842-875d-d637ef754b9f@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hqIFcdwIwwStCNvRehx6lGwxZoRz9mfSE" X-TMN: [I9X+iRT1Sjs47o7F8fkSTpboCsUu8+3ziFuVsRkOO8+6ydaGaJGdvizCjOkBNRx0] X-ClientProxiedBy: LO2P265CA0473.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::29) To AM6PR10MB2440.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:4c::30) X-Microsoft-Original-Message-ID: <38d07282-b601-5c6b-7ffa-f7a557e486c1@hotmail.de> 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 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2001:4dd7:7e83:0:d9e9:bbac:a0d3:801c] (2001:4dd7:7e83:0:d9e9:bbac:a0d3:801c) by LO2P265CA0473.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 19:04:03 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: b71b50c5-4709-4d2c-61f1-08d930305792 X-MS-TrafficTypeDiagnostic: DB8EUR06HT050: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nvXGIl3HcDW7F4AxB/1stOUxZjqWrVywa6C5Yk8qaIk9sVSqXNO5POncVKc2CJT3qxuT7ud8gvI1OVIDsnKGfhwdTjcyiMtJP/ZhKFEgzh60bbIzuKs2N572ZeoKT5I0+avrCNHR8Phwsh2VU6M7N7f9GUt8LSVPSTVqZxan97YhdPewNDqEtkgc+V4E9tMlEEhLU4sef5kjRaAWVxauCqWTIN8xqouGOq8zRufFyija7O54YnEFSKQCRogHHfTM72JYFiucPs8g6FfflnVq5eFSRGK320MxWIUy51bEmGLQAKod8+KI/VuNEtXqB5nW2XeG/hsOBXPMswvpFWw7SYxZ9ZE5VwKmy2HHyWTzN3qzODtHTdWcYVgmtrYpcUjZ+teYLf+XG2koS67R21KevA== X-MS-Exchange-AntiSpam-MessageData: a9x1SoG8Tpqs/uzmHXftGiDLoIE+GeX4kz6pPAxAVBAUFi0drFLYe7C2Nv9yp8OP9rnd2iuXntBOnOOq7bBxalAxnJOjK8tfSmMClBP3uiHN8aetmpa8wzsfzbWzYOzkio82O5l/K9m6x3VEmSNZZ4pRbQpfaItMXWbJDRp/gjcsV+rv1FWs5pELmwI4TM01/TsiF3MwxdA3hLrOs3Whwg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b71b50c5-4709-4d2c-61f1-08d930305792 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 19:04:04.3485 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR06FT053.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR06HT050 X-Archives-Salt: a8aac969-7f98-4c4b-b128-ba198143bc83 X-Archives-Hash: a8ffe0a5324e752afcc99be202f6378a --hqIFcdwIwwStCNvRehx6lGwxZoRz9mfSE Content-Type: multipart/mixed; boundary="cF6AVSLIOsh4hyvwhAzfhlhEcL5yOPAbo"; protected-headers="v1" From: Ramon Fischer To: gentoo-user@lists.gentoo.org Message-ID: <38d07282-b601-5c6b-7ffa-f7a557e486c1@hotmail.de> Subject: Re: [gentoo-user] cryptsetup close and device in use when it is not References: <70a1b488-c49e-6a94-a9a9-37eeb2ff4399@gmail.com> <9c9d5923-dccb-34d5-0f3b-16e07f337009@users.sourceforge.net> <649753f7-5dcd-1842-875d-d637ef754b9f@gmail.com> In-Reply-To: <649753f7-5dcd-1842-875d-d637ef754b9f@gmail.com> --cF6AVSLIOsh4hyvwhAzfhlhEcL5yOPAbo Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US If the "umount" command seems to be hanging next time, it is most likely = due to cache writebacks. You can monitor this like so: $ watch "grep 'Dirty\|Writeback' /proc/meminfo" -Ramon On 15/06/2021 17:26, Dale wrote: > Jack wrote: >> 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 proces= s >>>> still accessing the hard drive. Maybe you can solve it like this: >>>> >>>> =C2=A0=C2=A0=C2=A0 $ lsof /mnt/8tb >>>> =C2=A0=C2=A0=C2=A0 zsh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 8390 roo= t=C2=A0 cwd=C2=A0=C2=A0=C2=A0 DIR=C2=A0 253,2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= 4096 27787265 /mnt/8tb >>>> =C2=A0=C2=A0=C2=A0 $ kill 8390 >>>> =C2=A0=C2=A0=C2=A0 $ 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.=C2=A0 It's weird. >>> >>> When this happened last night, just before I posted, I let the drive = sit >>> there while I was doing updates.=C2=A0 Later on, I tried to close it = again >>> and it closed just fine.=C2=A0 I hadn't done anything except let it s= it >>> there.=C2=A0 While I was glad it closed, I wonder why it did it.=C2=A0= Did udev >>> finally catch up to the state of the drive?=C2=A0 Did some other devi= ce >>> update and allow it to close? >>> >>> This is weird.=C2=A0 Everything says it is ready to be closed but it = thinks >>> something is open.=C2=A0 I'm not sure what to point too for the probl= em.=C2=A0 Yet >>> anyway. >>> >>> Thanks for the tip.=C2=A0 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 >> >> >> > > I may try that next time but the light had stopped blinking for several= > minutes.=C2=A0 Since it is a SMR drive, I always leave it running until= I > can't feel the heads bumping around.=C2=A0 I don't think it would be th= at > but, it's worth a try. It may lead to something. > > Will update when it does it again. > > Thanks. > > Dale > > :-)=C2=A0 :-) > --=20 GPG public key: 5983 98DA 5F4D A464 38FD CF87 155B E264 13E6 99BF --cF6AVSLIOsh4hyvwhAzfhlhEcL5yOPAbo-- --hqIFcdwIwwStCNvRehx6lGwxZoRz9mfSE Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEWYOY2l9NpGQ4/c+HFVviZBPmmb8FAmDI+aEFAwAAAAAACgkQFVviZBPmmb/V IRAAioPu9KjC2Knr7uUvcYrspmqlwoxksiYxPEuHVj76GGFPhfcZkPrCC/bke5KJW6SMePlrOm7Z UnBJoKJmaz85j+VLyAQxJrGqELi4IiOnHvjmKzl78fwi0uQV2gekPaDawAaCzp/m+oIg2k/tjHbY GbeSdwdBW+rA6MRO/WoEQytwuQRJdxDkmeIy+YleQiBvrBQGi6bFRIWzN6u7eZiH4cCwnEPZFSGf 78RHdVkrAa8ZEMU3qPYQ2V3fSTZ3TUq4kNcZPUQBTDCM4uQBrfHGfsifxxk/KlJVGCEST1CFSzkP +zNiHGwYPKNOF1muvRW7Rudd2g8biOg701SfVUdAoK4juP5vIjI8impopffYzhC0tldSWVbrdug+ TxSrF0RlAJumDnBaoAYZfjYrn2z/FVH9UFp5WR5tMgfbMw768pZ5HVKa69FhxmWpe3VsW57YNq3Q UGAbg+k4Ek5KjAaa9B97jKTbhnIJ5knc4kOMlngsmX6V0sF4PAdHqMCks2gMNywDwtDwPdwak7MY eUXeXc2UpDRYbFmeBoTEQpdhx6b4e3SuO6cbUK5Tq0A76iIJDXH4eNKjVWMQURFFX9TWyl2i1BaF CbAw3iCmjfQyNHlZ2d2r4+8SKs/KEtGath5fTK89sSCKPNZF4MYhh2EH4m2kG30pUxIM2M8crLEK 6kk= =h1bs -----END PGP SIGNATURE----- --hqIFcdwIwwStCNvRehx6lGwxZoRz9mfSE--