From owner-freebsd-current@freebsd.org Thu Nov 26 17:34:30 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28BB446A023 for ; Thu, 26 Nov 2020 17:34:30 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ChlHn5sXsz4msm for ; Thu, 26 Nov 2020 17:34:29 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1kiL9y-0004J7-FJ; Thu, 26 Nov 2020 17:34:22 +0000 Date: Thu, 26 Nov 2020 17:34:22 +0000 From: Gary Palmer To: Graham Perrin Cc: freebsd-current@freebsd.org Subject: Re: zpool export: umount fails, device inexplicably busy (lsof finds nothing) Message-ID: <20201126173422.GB46155@in-addr.com> References: <4125dad7-b1ea-bf20-4996-6a138ff202eb@gmail.com> <1b4bf881-7689-95ac-6bb5-984d063bda73@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1b4bf881-7689-95ac-6bb5-984d063bda73@gmail.com> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 4ChlHn5sXsz4msm X-Spamd-Bar: / X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 17:34:30 -0000 On Thu, Nov 26, 2020 at 04:55:46PM +0000, Graham Perrin wrote: > On 25/11/2020 17:35, Graham Perrin wrote: > > ??? > > > root@momh167-gjp4-8570p:~ # zpool export Transcend > > > cannot unmount '/Volumes/t500': umount failed > > > root@momh167-gjp4-8570p:~ # umount /Volumes/t500 > > > umount: unmount of /Volumes/t500 failed: Device busy > > > root@momh167-gjp4-8570p:~ # lsof /Volumes/t500/ > > > root@momh167-gjp4-8570p:~ # > > > > > > ---- > > > > > > When this last occurred, I could export the pool after signing out > > > from KDE. > > > > > The problem seemed to be consistently reproducible but (fingers crossed) > > no problem yesterday or today. > > > > Previously: most often using OpenZFS in base. > > > > Now using OpenZFS from ports, with r367936. > > > > If the problem recurs: is it _ever_ sane to get nothing listed by lsof > > for a volume that can not be unmounted? > > I spoke too soon, the problem recurred this afternoon: > > root@mowa219-gjp4-8570p:~ # zpool export Transcend > cannot unmount '/Volumes/t500/VirtualBox': umount failed > root@mowa219-gjp4-8570p:~ # lsof /Volumes/t500/VirtualBox > lsof: WARNING: device cache mismatch: /dev/drm/121 > lsof: WARNING: /root/.lsof_mowa219-gjp4-8570p was updated. > root@mowa219-gjp4-8570p:~ # lsof /Volumes/t500/VirtualBox > root@mowa219-gjp4-8570p:~ # zpool export Transcend > cannot unmount '/Volumes/t500/VirtualBox': umount failed > root@mowa219-gjp4-8570p:~ # uname -v > FreeBSD 13.0-CURRENT #72 r367936: Sun Nov 22 21:46:00 GMT 2020 > root@mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG > root@mowa219-gjp4-8570p:~ # zfs --version > zfs-0.8.0-1 > zfs-kmod-v2020110200-zfs_8583540c6 > root@mowa219-gjp4-8570p:~ # does "fuser -c" show anything? the -m option may also be interesting (Search through mmapped files too) Regards, Gary