Posts: 16,409
Threads: 1,430
Joined: May 2025
I was trying to run DiskWarrior on a volume and kept getting an error message that the volume couldnt be unmounted because some files were in use. Quitting apps didn't help. Is there a way to identify what files are open on this other volume?
Posts: 1,395
Threads: 19
Joined: Nov 2007
Reputation:
0
lsof -- list open files by process
Applications->Utilities->Terminal
$ lsof
takes a variety of option switches (which you can see/learn about via
$ man lsof
happy hunting!)
Posts: 16,409
Threads: 1,430
Joined: May 2025
Any quick, easy way? Due to my lousy text entry skills, I avoid Terminal and know nothing about lavigating in a command line mode.
It would be really nice if Disk Warrior could produce a list of the files in use.
Posts: 1,395
Threads: 19
Joined: Nov 2007
Reputation:
0
"OPTIONS
In the absence of any options, lsof lists all open files belonging to
all active processes.
"
$ lsof
COMMAND . PID . USER . FD . TYPE DEVICE SIZE/OFF NODE . . . . NAME
sshd . . . . 21648 dhotay cwd VDIR 14,2 . . 1428 . . . . 2 . . . . . . /
sshd . . . . 21648 dhotay 0u . VCHR 3,2 . . 0t0 . . . . . 60880004 . /dev/null
...
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 347016 . . 2761. . . . . /bin/tcsh
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 1793424 . 1143496 . . /usr/lib/dyld
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 4398100 . 1143709 . . /usr/lib/libSystem.B.dylib
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 304580 . . 1143863 . . /usr/lib/libncurses.5.4.dylib
...
The last column, under NAME, is the file that is open.
(dots added to try to preserve vertical alignment)
Posts: 4,575
Threads: 371
Joined: Jan 2016
Did you try just logging out and logging back in and then using Disk Warrior?
Posts: 270
Threads: 1
Joined: Sep 2007
Posts: 16,409
Threads: 1,430
Joined: May 2025
Did you try just logging out and logging back in and then using Disk Warrior?
Logging out and in; restarting; swearing.
I did actually open Terminal and list open files. Would the volume name appear in the file's path name? Everything in the list appeared to be on the boot drive.
Posts: 270
Threads: 1
Joined: Sep 2007
Are you using a font manager?
Is it possible you've got some open font files on the volume in question?
Posts: 1,395
Threads: 19
Joined: Nov 2007
Reputation:
0
It sounds like there are files marked as open in the filesystem itself ( in the Finder database, perhaps?). These will not be listed by the 'lsof' command, which looks at a different set of data in the UNIX/MacOSX '/proc' (process data) directory tree.
Sorry, I don't know what would work for Desktop DB or Finder DB . I think an earlier topic mentioned File Buddy(?) as a possible tool.
Posts: 270
Threads: 1
Joined: Sep 2007
Another stab in the dark ... is Spotlight indexing turned off for that volume?