Re: zpool export: umount failed, device inexplicably busy

2020-11-30 Thread Ryan Moeller


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  

Re: zpool export: umount failed, device inexplicably busy (lsof found nothing)

2020-11-26 Thread Kurt Jaeger
Hi!

> If the problem recurs: is it _ever_ sane to get nothing listed by lsof
> for a volume that can not be unmounted?

Use fstat -- this is part of the base system.

Maybe lsof does not catch every corner case ?

-- 
p...@opsec.eu+49 171 3101372Now what ?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


zpool export: umount failed, device inexplicably busy (lsof found nothing)

2020-11-25 Thread Graham Perrin

On 11/10/2020 11:21, Graham Perrin wrote:


On 06/10/2020 21:29, Graham Perrin wrote:

lsof finds no open file.

How else might I tell why the device is busy?

Mobile hard disk drive, USB.


The same problem this morning,



root@momh167-gjp4-8570p:~ # zpool export Transcend
cannot unmount '/Volumes/t500': umount failed
root@momh167-gjp4-8570p:~ # lsof /Volumes/t500/
lsof: WARNING: device cache mismatch: /dev/usb/0.5.2
lsof: WARNING: /root/.lsof_momh167-gjp4-8570p was updated.
root@momh167-gjp4-8570p:~ # lsof /Volumes/t500/
root@momh167-gjp4-8570p:~ # usbconfig -d 0.5 dump_all_desc
ugen0.5:  at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) 
pwr=SAVE (0mA)


  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0300
  bDeviceClass = 0x0009  
  bDeviceSubClass = 0x
  bDeviceProtocol = 0x0003
  bMaxPacketSize0 = 0x0009
  idVendor = 0x0424
  idProduct = 0x5434
  bcdDevice = 0x3082
  iManufacturer = 0x0002  
  iProduct = 0x0003  
  iSerialNumber = 0x0001  <1239567>
  bNumConfigurations = 0x0001

 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x001f
    bNumInterfaces = 0x0001
    bConfigurationValue = 0x0001
    iConfiguration = 0x  
    bmAttributes = 0x00e0
    bMaxPower = 0x

    Interface 0
  bLength = 0x0009
  bDescriptorType = 0x0004
  bInterfaceNumber = 0x
  bAlternateSetting = 0x
  bNumEndpoints = 0x0001
  bInterfaceClass = 0x0009  
  bInterfaceSubClass = 0x
  bInterfaceProtocol = 0x
  iInterface = 0x  

 Endpoint 0
    bLength = 0x0007
    bDescriptorType = 0x0005
    bEndpointAddress = 0x0081  
    bmAttributes = 0x0013  
    wMaxPacketSize = 0x0002
    bInterval = 0x0008
    bRefresh = 0x
    bSynchAddress = 0x

  Additional Descriptor

  bLength = 0x06
  bDescriptorType = 0x30
  bDescriptorSubType = 0x00
   RAW dump:
   0x00 | 0x06, 0x30, 0x00, 0x00, 0x02, 0x00




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?


___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: zpool export: umount failed, device inexplicably busy

2020-10-11 Thread Graham Perrin


On 06/10/2020 21:29, Graham Perrin wrote:

lsof finds no open file.

How else might I tell why the device is busy?

Mobile hard disk drive, USB.


The same problem this morning,



root@momh167-gjp4-8570p:~ # zpool export Transcend
cannot unmount '/Volumes/t500': umount failed
root@momh167-gjp4-8570p:~ # lsof /Volumes/t500/
lsof: WARNING: device cache mismatch: /dev/usb/0.5.2
lsof: WARNING: /root/.lsof_momh167-gjp4-8570p was updated.
root@momh167-gjp4-8570p:~ # lsof /Volumes/t500/
root@momh167-gjp4-8570p:~ # usbconfig -d 0.5 dump_all_desc
ugen0.5:  at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) 
pwr=SAVE (0mA)


  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0300
  bDeviceClass = 0x0009  
  bDeviceSubClass = 0x
  bDeviceProtocol = 0x0003
  bMaxPacketSize0 = 0x0009
  idVendor = 0x0424
  idProduct = 0x5434
  bcdDevice = 0x3082
  iManufacturer = 0x0002  
  iProduct = 0x0003  
  iSerialNumber = 0x0001  <1239567>
  bNumConfigurations = 0x0001

 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x001f
    bNumInterfaces = 0x0001
    bConfigurationValue = 0x0001
    iConfiguration = 0x  
    bmAttributes = 0x00e0
    bMaxPower = 0x

    Interface 0
  bLength = 0x0009
  bDescriptorType = 0x0004
  bInterfaceNumber = 0x
  bAlternateSetting = 0x
  bNumEndpoints = 0x0001
  bInterfaceClass = 0x0009  
  bInterfaceSubClass = 0x
  bInterfaceProtocol = 0x
  iInterface = 0x  

 Endpoint 0
    bLength = 0x0007
    bDescriptorType = 0x0005
    bEndpointAddress = 0x0081  
    bmAttributes = 0x0013  
    wMaxPacketSize = 0x0002
    bInterval = 0x0008
    bRefresh = 0x
    bSynchAddress = 0x

  Additional Descriptor

  bLength = 0x06
  bDescriptorType = 0x30
  bDescriptorSubType = 0x00
   RAW dump:
   0x00 | 0x06, 0x30, 0x00, 0x00, 0x02, 0x00




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.


___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


zpool export: umount failed, device inexplicably busy

2020-10-06 Thread Graham Perrin

lsof finds no open file.

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