From owner-freebsd-current@freebsd.org Mon Nov 30 11:09:36 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 592704778EE for ; Mon, 30 Nov 2020 11:09:36 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cl2Yr28d4z3C2g for ; Mon, 30 Nov 2020 11:09:36 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from Ryans-MBP.attlocal.net (unknown [IPv6:2600:1700:358a:c660:b0e7:13b5:50e4:52d8]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: freqlabs/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1F0112D3D5 for ; Mon, 30 Nov 2020 11:09:36 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Subject: Re: zpool export: umount failed, device inexplicably busy To: freebsd-current@freebsd.org References: From: Ryan Moeller Message-ID: <747403d2-362a-1279-ca55-8d8c2a4a4c65@FreeBSD.org> Date: Mon, 30 Nov 2020 06:09:34 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 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-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: Mon, 30 Nov 2020 11:09:36 -0000 On 10/6/20 4:29 PM, Graham Perrin wrote: > lsof finds no open file. Please be wary of lsof. I'm not sure it works on OpenZFS. The port reaches into /usr/src for zfs headers in locations that don't exist anymore to access kernel memory in /dev/kmem using structs that are different in OpenZFS. It is likely not building the ZFS support code on 13-current, and it is not expected to work on 12 with openzfs from ports, either. -Ryan > > How else might I tell why the device is busy? > > Mobile hard disk drive, USB. > > -- > > root@momh167-gjp4-8570p:~ # zpool export Transcend > cannot unmount '/Volumes/t500': umount failed > root@momh167-gjp4-8570p:~ # lsof /Volumes/t500 > root@momh167-gjp4-8570p:~ # zpool export Transcend > cannot unmount '/Volumes/t500': umount failed > 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:~ # zfs version > zfs-0.8.0-1 > zfs-kmod-0.8.0-1 > root@momh167-gjp4-8570p:~ # zpool iostat Transcend 3 >               capacity     operations     bandwidth > pool        alloc   free   read  write   read  write > ----------  -----  -----  -----  -----  -----  ----- > Transcend    126G   338G      0      0  3.29K  1.45K > Transcend    126G   338G      0      0      0      0 > Transcend    126G   338G      0      0      0      0 > Transcend    126G   338G      0      0      0      0 > Transcend    126G   338G      0      0      0      0 > Transcend    126G   338G      0      0      0      0 > ^C > root@momh167-gjp4-8570p:~ # umount /Volumes/t500/ > umount: unmount of /Volumes/t500 failed: Device busy > root@momh167-gjp4-8570p:~ # ls -ahl /Volumes/t500 > total 10 > drwxr-xr-x  3 root          wheel            3B Sep  2 19:02 . > drwxr-xr-x  4 root          wheel            4B Sep  5 09:15 .. > drwxr-xr-x  6 grahamperrin  grahamperrin     6B Sep 11 17:54 VirtualBox > root@momh167-gjp4-8570p:~ # zpool status Transcend >   pool: Transcend >  state: ONLINE >   scan: scrub repaired 0B in 00:28:07 with 0 errors on Tue Oct  6 > 00:03:13 2020 > config: > >         NAME        STATE     READ WRITE CKSUM >         Transcend   ONLINE       0     0     0 >           da0p1     ONLINE       0     0     0 > > errors: No known data errors > 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:~ # date ; uname -v > Tue Oct  6 21:20:17 BST 2020 > FreeBSD 13.0-CURRENT #67 r366424: Sun Oct  4 19:54:32 BST 2020 > root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG > root@momh167-gjp4-8570p:~ # ls /dev/da* > /dev/da0        /dev/da0p1 > root@momh167-gjp4-8570p:~ # zfs get all Transcend Transcend/VirtualBox > NAME                  PROPERTY VALUE                     SOURCE > Transcend             type filesystem                - > Transcend             creation              Wed Sep  2 18:31 2020     - > Transcend             used 126G                      - > Transcend             available 324G                      - > Transcend             referenced 126G                      - > Transcend             compressratio 1.66x                     - > Transcend             mounted yes                       - > Transcend             quota none                      default > Transcend             reservation none default > Transcend             recordsize 128K                      default > Transcend             mountpoint /Volumes/t500             local > Transcend             sharenfs off                       default > Transcend             checksum on                        default > Transcend             compression zstd                      local > Transcend             atime on                        default > Transcend             devices on                        default > Transcend             exec on                        default > Transcend             setuid on                        default > Transcend             readonly off                       default > Transcend             jailed off                       default > Transcend             snapdir hidden                    default > Transcend             aclmode discard                   default > Transcend             aclinherit restricted                default > Transcend             createtxg 1                         - > Transcend             canmount on                        default > Transcend             xattr on                        default > Transcend             copies 1                         default > Transcend             version 5                         - > Transcend             utf8only off                       - > Transcend             normalization none                      - > Transcend             casesensitivity sensitive                 - > Transcend             vscan off                       default > Transcend             nbmand off                       default > Transcend             sharesmb off                       default > Transcend             refquota none                      default > Transcend             refreservation none default > Transcend             guid 6806553549477274436       - > Transcend             primarycache all default > Transcend             secondarycache all default > Transcend             usedbysnapshots 0B                        - > Transcend             usedbydataset 126G                      - > Transcend             usedbychildren 47.2M                     - > Transcend             usedbyrefreservation 0B                        - > Transcend             logbias latency                   default > Transcend             objsetid 54                        - > Transcend             dedup off                       default > Transcend             mlslabel none                      default > Transcend             sync standard                  default > Transcend             dnodesize legacy                    default > Transcend             refcompressratio 1.66x                     - > Transcend             written 126G                      - > Transcend             logicalused 210G                      - > Transcend             logicalreferenced 210G - > Transcend             volmode default                   default > Transcend             filesystem_limit none default > Transcend             snapshot_limit none default > Transcend             filesystem_count none default > Transcend             snapshot_count none default > Transcend             snapdev hidden                    default > Transcend             context none                      default > Transcend             fscontext none                      default > Transcend             defcontext none                      default > Transcend             rootcontext none default > Transcend             relatime off                       default > Transcend             redundant_metadata all default > Transcend             overlay on                        default > Transcend             encryption off                       default > Transcend             keylocation none default > Transcend             keyformat none                      default > Transcend             pbkdf2iters 0 default > Transcend             special_small_blocks 0                         > default > Transcend/VirtualBox  type filesystem                - > Transcend/VirtualBox  creation              Wed Sep  2 19:02 2020     - > Transcend/VirtualBox  used 200K                      - > Transcend/VirtualBox  available 324G                      - > Transcend/VirtualBox  referenced 200K                      - > Transcend/VirtualBox  compressratio 1.00x                     - > Transcend/VirtualBox  mounted no                        - > Transcend/VirtualBox  quota none                      default > Transcend/VirtualBox  reservation none default > Transcend/VirtualBox  recordsize 128K                      default > Transcend/VirtualBox  mountpoint /Volumes/t500/VirtualBox inherited > from Transcend > Transcend/VirtualBox  sharenfs off                       default > Transcend/VirtualBox  checksum on                        default > Transcend/VirtualBox  compression zstd inherited from Transcend > Transcend/VirtualBox  atime off                       local > Transcend/VirtualBox  devices on                        default > Transcend/VirtualBox  exec on                        default > Transcend/VirtualBox  setuid on                        default > Transcend/VirtualBox  readonly off                       default > Transcend/VirtualBox  jailed off                       default > Transcend/VirtualBox  snapdir hidden                    default > Transcend/VirtualBox  aclmode discard                   default > Transcend/VirtualBox  aclinherit restricted                default > Transcend/VirtualBox  createtxg 375                       - > Transcend/VirtualBox  canmount on                        default > Transcend/VirtualBox  xattr on                        default > Transcend/VirtualBox  copies 1                         default > Transcend/VirtualBox  version 5                         - > Transcend/VirtualBox  utf8only off                       - > Transcend/VirtualBox  normalization none                      - > Transcend/VirtualBox  casesensitivity sensitive                 - > Transcend/VirtualBox  vscan off                       default > Transcend/VirtualBox  nbmand off                       default > Transcend/VirtualBox  sharesmb off                       default > Transcend/VirtualBox  refquota none                      default > Transcend/VirtualBox  refreservation none default > Transcend/VirtualBox  guid 11240822048258000557      - > Transcend/VirtualBox  primarycache all default > Transcend/VirtualBox  secondarycache all default > Transcend/VirtualBox  usedbysnapshots 0B                        - > Transcend/VirtualBox  usedbydataset 200K                      - > Transcend/VirtualBox  usedbychildren 0B                        - > Transcend/VirtualBox  usedbyrefreservation 0B                        - > Transcend/VirtualBox  logbias latency                   default > Transcend/VirtualBox  objsetid 76                        - > Transcend/VirtualBox  dedup off                       default > Transcend/VirtualBox  mlslabel none                      default > Transcend/VirtualBox  sync standard                  default > Transcend/VirtualBox  dnodesize legacy                    default > Transcend/VirtualBox  refcompressratio 1.00x                     - > Transcend/VirtualBox  written 200K                      - > Transcend/VirtualBox  logicalused 49.5K                     - > Transcend/VirtualBox  logicalreferenced 49.5K - > Transcend/VirtualBox  volmode default                   default > Transcend/VirtualBox  filesystem_limit none default > Transcend/VirtualBox  snapshot_limit none default > Transcend/VirtualBox  filesystem_count none default > Transcend/VirtualBox  snapshot_count none default > Transcend/VirtualBox  snapdev hidden                    default > Transcend/VirtualBox  context none                      default > Transcend/VirtualBox  fscontext none                      default > Transcend/VirtualBox  defcontext none                      default > Transcend/VirtualBox  rootcontext none default > Transcend/VirtualBox  relatime off                       default > Transcend/VirtualBox  redundant_metadata all default > Transcend/VirtualBox  overlay on                        default > Transcend/VirtualBox  encryption aes-256-gcm               - > Transcend/VirtualBox  keylocation prompt                    local > Transcend/VirtualBox  keyformat passphrase                - > Transcend/VirtualBox  pbkdf2iters 350000                    - > Transcend/VirtualBox  encryptionroot Transcend/VirtualBox      - > Transcend/VirtualBox  keystatus unavailable               - > Transcend/VirtualBox  special_small_blocks 0                         > default > root@momh167-gjp4-8570p:~ # zpool get all Transcend > NAME       PROPERTY VALUE                          SOURCE > Transcend  size 464G                           - > Transcend  capacity 27%                            - > Transcend  altroot -                              default > Transcend  health ONLINE                         - > Transcend  guid 8076233369858608335            - > Transcend  version -                              default > Transcend  bootfs -                              default > Transcend  delegation on                             default > Transcend  autoreplace off                            default > Transcend  cachefile -                              default > Transcend  failmode wait                           default > Transcend  listsnapshots off                            default > Transcend  autoexpand off                            default > Transcend  dedupratio 1.00x                          - > Transcend  free 338G                           - > Transcend  allocated 126G                           - > Transcend  readonly off                            - > Transcend  ashift 0                              default > Transcend  comment -                              default > Transcend  expandsize -                              - > Transcend  freeing 0                              - > Transcend  fragmentation 12%                            - > Transcend  leaked 0                              - > Transcend  multihost off                            default > Transcend  checkpoint -                              - > Transcend  load_guid 15610592478404149099           - > Transcend  autotrim off                            default > Transcend  feature@async_destroy enabled local > Transcend  feature@empty_bpobj active local > Transcend  feature@lz4_compress active local > Transcend  feature@multi_vdev_crash_dump > enabled                        local > Transcend  feature@spacemap_histogram active                         > local > Transcend  feature@enabled_txg active local > Transcend  feature@hole_birth active                         local > Transcend  feature@extensible_dataset active                         > local > Transcend  feature@embedded_data active local > Transcend  feature@bookmarks enabled                        local > Transcend  feature@filesystem_limits enabled                        local > Transcend  feature@large_blocks enabled local > Transcend  feature@large_dnode enabled local > Transcend  feature@sha512 enabled                        local > Transcend  feature@skein enabled                        local > Transcend  feature@userobj_accounting active                         > local > Transcend  feature@encryption active                         local > Transcend  feature@project_quota active local > Transcend  feature@device_removal enabled local > Transcend  feature@obsolete_counts enabled local > Transcend  feature@zpool_checkpoint enabled local > Transcend  feature@spacemap_v2 active local > Transcend  feature@allocation_classes enabled                        > local > Transcend  feature@resilver_defer enabled local > Transcend  feature@bookmark_v2 enabled local > Transcend  feature@redaction_bookmarks enabled                        > local > Transcend  feature@redacted_datasets enabled                        local > Transcend  feature@bookmark_written enabled local > Transcend  feature@log_spacemap active local > Transcend  feature@livelist enabled                        local > Transcend  feature@device_rebuild enabled local > Transcend  feature@zstd_compress active local > root@momh167-gjp4-8570p:~ # > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"