This is not possible using stock OS X since even on a normal drive (and not getting into any core storage considerations), diskutil does not support the UFSD_NTFS and NTFS formats:
Mac:~ bmike$ diskutil listFilesystems
Formattable file systems
These file system personalities can be used for erasing and partitioning.
When specifying a personality as a parameter to a verb, case is not considered.
Certain common aliases (also case-insensitive) are listed below as well.
-------------------------------------------------------------------------------
PERSONALITY USER VISIBLE NAME
-------------------------------------------------------------------------------
ExFAT ExFAT
Free Space Free Space
(or) free
MS-DOS MS-DOS (FAT)
MS-DOS FAT12 MS-DOS (FAT12)
MS-DOS FAT16 MS-DOS (FAT16)
MS-DOS FAT32 MS-DOS (FAT32)
(or) fat32
HFS+ Mac OS Extended
Case-sensitive HFS+ Mac OS Extended (Case-sensitive)
(or) hfsx
Case-sensitive Journaled HFS+ Mac OS Extended (Case-sensitive, Journaled)
(or) jhfsx
Journaled HFS+ Mac OS Extended (Journaled)
(or) jhfs+
You would need to use a tool other than diskutil
to perform the formatting, but the Apple tools will respect and leave alone these volumes or make space for them by leaving free space or a FAT/ExFAT partition that you could then erase and leave NTFS data on the drive. Additionally, the Paragon pre-sales FAQ for 10.0.2 doesn't mention either Fustion Drive or Core Storage, so I would assume they don't support this. Have you asked them if core storage is supported?
lsof
is indeed your best bet. The fastest and easiest way would be this :-
sudo lsof /Volumes/myDrive
It can take a couple minutes to run, but once it's complete, it gives you a list of open files on the disk. The output will look something like this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mds 89 root 19r DIR 52,3 432 2 /Volumes/Photos
mds 89 root 23r DIR 52,3 432 2 /Volumes/Photos
Finder 681 alans 14r DIR 52,3 432 2 /Volumes/Photos
QuickLook 2158 alans 9r REG 52,3 1141591 78651 /Volumes/Photos/_tmp_iphone_10_backup/APC_1546.JPG
In this case, it's the QuickLook
application that has a file open. Closing the application directly is the best way to fix the issue. However, that's not always possible. For example, QuickLook doesn't show up as an application you can get to in the Dock.
If you can't close the application manually, you can use the kill
command to terminate it from the command line. To do that, use the PID
from the second column as the ID to kill. From the above example, it would be:
kill 2158
Note that sometimes that doesn't work and a more aggressive form of kill
must be used. Here's a series of escalating aggressiveness (using the example PID of 2158):
kill 2158
sudo kill 2158
sudo kill -INT 2158
sudo kill -KILL 2158
You should be able to eject the disk once the process/application has been killed.
One final note, lsof
can take a minute or two. It can also hang, but you should give it at least a few minutes before you decide that's what happened.
Also, sometimes the base command sudo lsof /Volumes/myDrive
won't find anything. If that happens, try adding the +D
argument (i.e. sudo lsof +D /Volumes/myDrive
). That will do a top down scan of the disk. It'll take longer, but it should pick up anything that's causing the disk to be un-ejectable.
(Hat tip to Alec Jacobson's post for extra details.)
Best Answer
See diskutil