I recently got a new mac and simultaneously upgraded from Mojave to Monterey.
Formerly, when I ran diskutil unmountDisk <disk here>
, if there was a dissenting process, it would provide me with the PID of the dissenter, e.g.,
$ diskutil unmountDisk disk4
Unmount of disk4 failed: at least one volume could not be unmounted
Unmount was dissented by PID 293
But now this useful information seems to be nowhere to be found, i.e., the result of the above command is now simply
$ diskutil unmountDisk disk4
Unmount of disk4 failed: at least one volume could not be unmounted
I'm wondering if there is still any way to recover the PID of the dissenting process(es) programmatically, whether through diskutil or some other tool. Thanks!