Thanks. That shows:
Davids-MacBook-Pro:~ david$ sudo lsof /dev/disk2s2
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mds 57 root 17r DIR 1,9 476 2 /Volumes/_data2_mb_
mds 57 root 28r DIR 1,9 476 2 /Volumes/_data2_mb_
mds 57 root 55r DIR 1,9 476 2 /Volumes/_data2_mb_
Safari 6624 david txt REG 1,9 407224 278205 /Volumes/_data2_mb_/data2/login.keychain
Dashboard 8077 david txt REG 1,9 407224 278205 /Volumes/_data2_mb_/data2/login.keychain
From what I understand, the mds tasks are part spotlight indexing, which I don't think are an issue (or maybe they are).
I have no clue what Safari and Dashboard are doing accessing keychains on this drive image. Like I said, I'm good at *nix (awk, vi, emacs, grep, find, xargs, etc) but this is OSX-specific stuff.
So I killed the task:
kill 6624
Davids-MacBook-Pro:~ david$ sudo lsof /dev/disk2s2
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mds 57 root 28r DIR 1,9 476 2 /Volumes/_private_mb_
Dashboard 8077 david txt REG 1,9 407224 278205 /Volumes/_private_mb_/private/login.keychain
Now, when I try and eject, I get the same pop-up I would get if I quit Safari:
The disk "_data2_mb_" wasn't ejected because one or more programs may be using it.
You can try to eject the disk again or click Force Eject to ject it immediately.
So, I try killing the other tasks:
Davids-MacBook-Pro:~ david$ sudo kill -9 57
Davids-MacBook-Pro:~ david$ sudo lsof /dev/disk2s2
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Dashboard 8077 david txt REG 1,9 407224 278205 /Volumes/_private_mb_/private/login.keychain
mds 12497 root 9r DIR 1,9 476 2 /Volumes/_private_mb_
mds 12497 root 11r DIR 1,9 476 2 /Volumes/_private_mb_
mds 12497 root 13r DIR 1,9 476 2 /Volumes/_private_mb_
But they come right back and I get the same pop-up.
I have to click OK and get more pop-ups warning the world will end if I force-eject the disk 🙂
Like I said, after I re-installed OSX, it didn't do this for a while but eventually came back.
David