Fusion Drive: free space on SSD

fusion-drivehard drivessd

Is there a possibility to find out how much storage is free on a SSD of a Fusion Drive disk (SSD + HDD as a logical device)? The structure I use is this one here:

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *256.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:          Apple_CoreStorage                         255.7 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 Boot OS X               650.0 MB   disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Fusion                 *1.3 TB     disk2

I would like to see how much space there is free on my SSD (disk0s2) but I cannot find out how to do this. Perhaps it's important to say, that I've encrypted the whole fusion drive. The standard way does not work in this case:

$ df -h /dev/disk0s2
df: /dev/disk0s2: Raw devices not supported

$ df -h /dev/disk0
df: /dev/disk0: Raw devices not supported

Thanks in advance for your effort.

Best Answer

At least 4 GB of the SSD portion of a Fusion drive is left empty at all times. That space is used for incoming writes. If there's less than 4 GB of empty space on the SSD, Core Storage will start offloading data to the HDD.

So if all your data is less than your SSD capacity less 4 GB, then you have whatever your SSD capacity is (128 GB on all Apple supplied Fusion drives) minus the amount of your data. Otherwise, you've got 4 GB free.

As an aside, the reason df doesn't work in this case is that it only reads filesystems. The filesystem sits atop the logical volume created by Core Storage (the software behind Fusion) — there's no "SSD portion" or "HDD portion", to the filesystem it's all one big drive.