Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

My question is:

How can i determine which files are on the SSD "partition" on Fusion Drive?

I have an iMac with 1TB Fusion Drive, and it would be good to know which apps or data are on which partition.

Is these information included in the file information or where do i have to look?

Terminal is no problem, so i'm not searching for a easy answer.

EDIT: diskutil list shows me my partitions. But i cannot navigate through /Volumes/... into the specific SSD partition. There must be a way to navigate into each partition, right?

OS X does the same.

share|improve this question
1  
This isn't an answer but is definitely worth a look: anandtech.com/show/6679/a-month-with-apples-fusion-drive The author uses iStat Menus 4 to view disk activity of the individual devices, you can see them on page 3, "Under The Hood." –  da4 Apr 16 '13 at 16:44

1 Answer 1

up vote 13 down vote accepted
+100

Because the Fusion drive is one logical volume, there are no separate "partitions" to browse to determine this. You can however check which drive an given file is stored on with some command-line utilities.

Determine Your Drive Setup

First we have to figure out how the SSD and HD portions of the Fusion drive are identified in your system.

  1. Run diskutil list in Terminal.
  2. You should see output similar to this:

    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *121.3 GB disk0
    1: EFI 209.7 MB disk0s1
    2: Apple_CoreStorage 121.0 GB disk0s2
    3: Apple_Boot Boot OS X 134.2 MB disk0s3
    /dev/disk1
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *1.0 TB disk1
    1: EFI 209.7 MB disk1s1
    2: Apple_CoreStorage 999.3 GB disk1s2
    3: Apple_Boot Recovery HD 650.0 MB disk1s3
    /dev/disk2
    #: TYPE NAME SIZE IDENTIFIER
    0: Apple_HFS Macintosh HD *1.1 TB disk2
    
  3. Take note of labels of the disks with a GUID_partition_scheme line. In this case, that's disk0 and disk1. These are the two physical disks, and we can see by the sizes, the smaller one (disk0) is the SSD, meaning disk2 is the HD.

Monitor Disk Activity

Now we need a way to monitor disk activity for each device.

  1. Open Terminal, enter iostat -d disk0 disk1 1, replacing the disk numbers with those you found in above.
  2. Run the command, and leave the Terminal window open. You should see output similar to this:

           disk0           disk1 
     KB/t tps  MB/s     KB/t tps  MB/s 
     26.52  13  0.33     9.35   0  0.00 
     0.00   0  0.00     0.00   0  0.00 
     0.00   0  0.00     0.00   0  0.00 
     0.00   0  0.00     0.00   0  0.00 
    

    This shows you the disk activity on a per-device basis, updated every second. The MB/s columns are the most relevant.

Read a File

Now we'll read a file, and use our monitoring solution to discover which drive it resides on.

  1. Open a second Terminal window, and run dd if='/path/to/some/file' of=/dev/null. Replace the path with the proper path to the file (be sure it's quoted if it has unescaped spaces or other special characters).
  2. In the terminal window running iostat, watch the to see which disk shows some activity when dd is running. That's the drive the file resides on.
  3. For large files (especially those on the HD, the dd process may run for a while, you can safely quit it with control+C

Readings like this indicate that disk0 (the SSD in this example) contains the file:

       disk0           disk1 
 KB/t tps  MB/s     KB/t tps  MB/s 
 28.49  13  0.37   113.92   0  0.00 
 31.70 4500 139.29     0.00   0  0.00 
 31.64 3870 119.56     0.00   0  0.00 
 31.58 3294 101.58     0.00   0  0.00 

Whereas these readings indicate that the file is stored on the HD:

       disk0           disk1 
 KB/t tps  MB/s     KB/t tps  MB/s 
 0.00   0  0.00   128.00 275 34.33 
 0.00   0  0.00   128.00 255 31.83 
 7.62  53  0.39   126.90 178 22.03 
share|improve this answer
    
That's great! Thank's a lot! But there are always smaller writes to the drive. Even if i don't do anything. Plus a delay when i execute the "dd". For smaller files (10MB), there is a "problem". But if i execute the dd, there are, after 3 seconds, always on the "ssd"-side transactions...so maybe this helps! –  gruberb Apr 16 '13 at 17:22
    
Depending on the access patterns and how long you've been using your Fusion drive, accessing a file once or twice may be enough for the system to "promote" it to the SSD, in which case you may see access on both, so it's unfortunately not foolproof, but it should be enough for a good guess. –  robmathers Apr 16 '13 at 18:00
    
But a question: Why doesn't the "df "filename" command doesn't show the right partition? It only shows "disk2". –  gruberb Apr 16 '13 at 19:56
    
Because Fusion doesn't work with traditional partitions. disk2 in is the logical volume created by joining the two drives. From the filesystem's point of view, that is where the file lives, but it's independent of where the underlying bits are physically stored. You might want to read up on how the Fusion drive works for a more in-depth explanation. –  robmathers Apr 16 '13 at 20:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.