From owner-freebsd-current@freebsd.org Sun Nov 29 08:54:40 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 49FAA47B1E5 for ; Sun, 29 Nov 2020 08:54:40 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CkMcb3t5zz3sYd for ; Sun, 29 Nov 2020 08:54:39 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: by mail-wm1-x334.google.com with SMTP id x22so12386175wmc.5 for ; Sun, 29 Nov 2020 00:54:39 -0800 (PST) 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=vTR4hmjCvhWlJwNvfmu0Xas1rbPYeNFaMiesXQ3CttA=; b=pv06sNR2tPWxdwBHW3A/esAKvu0EKjWyQaJJZ4oLhlSc9nS16tQXSDDRUMShdTQ2GQ J09VM60FhVRHJrjNws9AcKxDFkl2XnNug2XdFGhTzgWSu+K8mcwr5lwRqdtOV4bys9RC 2n/VI2ALoIgvJOBFf++hUQCCoqykg2Be4U18UxY6eT9keiqRW3hQI0RQFDhfiK2dpWGr kxdGc0Rd5lNt/SFqObji9oxnld58KrRBl7SxOW/HvttGNPgISJIkZw2oNGhCh3i4Max6 FhOFVU6uwWy6XlN8aMlTFSHmwM0h3GKZGrDjIaVfs39Hg3pT06eiU3jpSWVCGPZsEpTd lsvg== X-Gm-Message-State: AOAM531PoBg5xTPclDaMI5wuJWKQQZUasJANvnf246WppWSRSe55hOB4 9Ys5onGxciRK0/doyJoT8DLLCrrYpe+4Jg== X-Google-Smtp-Source: ABdhPJzkK3gfKjAusGY50pD3uewx8ltO0P8fzYMZhn6rkWEQvmF9jENL1NGXVCOCaEGQkSrMSJtiGw== X-Received: by 2002:a05:600c:258:: with SMTP id 24mr2004442wmj.16.1606640076913; Sun, 29 Nov 2020 00:54:36 -0800 (PST) Received: from [192.168.1.11] (79-66-147-78.dynamic.dsl.as9105.com. [79.66.147.78]) by smtp.gmail.com with ESMTPSA id c17sm23153107wro.19.2020.11.29.00.54.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Nov 2020 00:54:36 -0800 (PST) Subject: zpool export: umount fails due to gvfsd-trash (Thunar wrongly opened by Firefox) To: freebsd-current@freebsd.org References: <4125dad7-b1ea-bf20-4996-6a138ff202eb@gmail.com> <20201126100754.GB74574@home.opsec.eu> From: Graham Perrin Message-ID: <0cc2a420-2179-47a6-0c01-2e7d238b7b1a@gmail.com> Date: Sun, 29 Nov 2020 08:54:35 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201126100754.GB74574@home.opsec.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 4CkMcb3t5zz3sYd X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.94 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.94)[-0.935]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::334:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[79.66.147.78:received]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::334:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::334:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-current] 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: Sun, 29 Nov 2020 08:54:40 -0000 On 26/11/2020 10:07, Kurt Jaeger wrote: > Use fstat -- this is part of the base system. > > Maybe lsof does not catch every corner case ? On 26/11/2020 17:34, Gary Palmer wrote: > does "fuser -c" show anything? > > the -m option may also be interesting (Search through mmapped files too) > > Regards, > > Gary Thanks. As far as I can tell the problem occurs only when Thunar, which I rarely use, is wrongly opened by Firefox. KDE Plasma here. I can't recall how to force applications such as Firefox to respect my preference for Dolphin. gvfsd-trash considered harmful From htop: …   PID USER      PRI  NI  VIRT   RES S CPU% MEM%   TIME+  Command  4484 grahamper  21   0 39168 12692 S  0.0  0.1  0:00.17    ├─ gvfsd-metadata  4206 grahamper  20   0 37768  8564 S  0.0  0.1  0:00.12    ├─ gvfs-gphoto2-volume-monitor  4201 grahamper  20   0 36548  8188 S  0.0  0.0  0:00.11    ├─ gvfs-mtp-volume-monitor  4184 grahamper  20   0 48072 13168 S  0.0  0.1  0:00.63    ├─ gvfs-udisks2-volume-monitor  4179 grahamper  20   0 40660  8748 S  0.0  0.1  0:00.17    ├─ gvfsd  7288 grahamper  20   0 45140 10476 S  0.0  0.1  0:00.06    │  ├─ gvfsd-dnssd --spawner :1.34 /org/gtk/gvfs/exec_spaw/5  7285 grahamper  20   0 53520 10016 S  0.0  0.1  0:00.09    │  ├─ gvfsd-network --spawner :1.34 /org/gtk/gvfs/exec_spaw/3  5883 grahamper  20   0 47608  9640 S  0.0  0.1  0:01.07    │  └─ gvfsd-trash --spawner :1.34 /org/gtk/gvfs/exec_spaw/2 ---- root@mowa219-gjp4-8570p:~ # zpool export Transcend cannot unmount '/Volumes/t500/VirtualBox': umount failed root@mowa219-gjp4-8570p:~ # fstat -f /Volumes/t500/VirtualBox USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W grahampe gvfsd-trash  5883   19 /Volumes/t500/VirtualBox     34 drwxr-xr-x       7  r grahampe gvfsd-trash  5883   20 /Volumes/t500/VirtualBox     34 drwxr-xr-x       7  r grahampe gvfsd-trash  5883   21 /Volumes/t500/VirtualBox    401 drwx------       4  r grahampe gvfsd-trash  5883   22 /Volumes/t500/VirtualBox    403 drwxr-xr-x       3  r root@mowa219-gjp4-8570p:~ # fuser -c /Volumes/t500/VirtualBox /Volumes/t500/VirtualBox: root@mowa219-gjp4-8570p:~ # find /Volumes/t500/VirtualBox \( -inum 34 -or -inum 401 -or -inum 403 \) -print /Volumes/t500/VirtualBox /Volumes/t500/VirtualBox/.Trash-1002 /Volumes/t500/VirtualBox/.Trash-1002/files root@mowa219-gjp4-8570p:~ # zfs list /Volumes/t500 /Volumes/t500/VirtualBox NAME                   USED  AVAIL     REFER  MOUNTPOINT Transcend              115G   335G       96K  /Volumes/t500 Transcend/VirtualBox   114G   335G      114G /Volumes/t500/VirtualBox root@mowa219-gjp4-8570p:~ # (My previous over-reliance upon lsof stemmed from familiarity with the command on Mac OS X with HFS Plus.)