Is there a way to change order of physical disks in Corestorage
I upgraded existing system to a "Fusion drive" - corestorage volume - consisting of existing 300GB HDD and new 120GB SSD.
Instead of creating a new corestorage drive I went with the route of converting the system drive to corestorage, adding new SSD as a corestorage volume, and then resizing logical volume to the new size. Order of commands is like that:
bash-3.2# diskutil cs convert disk1s2 #disk1s2 - existing HDD with OSX
Started CoreStorage operation on disk1s2 Macintosh HD
Resizing disk to fit Core Storage headers
Creating Core Storage Logical Volume Group
Attempting to unmount disk1s2
Switching disk1s2 to Core Storage
Couldn't unmount disk1s2; converted volume won't appear until it's unmounted
Core Storage LVG UUID: 0BE79B93-86D9-41DE-9071-D9DD933037CD
Core Storage PV UUID: AD5882F6-6210-41CA-8F9E-76F6E3CA44E9
Core Storage LV UUID: ADFEA6C1-18D8-4705-8006-9641BC2B7C6F
Finished CoreStorage operation on disk1s2 Macintosh HD
--reboot--
bash-3.2# diskutil cs adddisk 0BE79B93-86D9-41DE-9071-D9DD933037CD disk0 #1st param - CS LVG, disk0 - SSD ID
Started CoreStorage operation on disk0
Unmounting disk0
Repartitioning disk0
Unmounting disk
Creating the partition map
Rediscovering disk0
Adding disk0s2 to Logical Volume Group
Switching disk0s2 to Core Storage
Waiting for Logical Volume Group to come back online
Core Storage PV UUID: E2664618-2492-4B13-905D-57D92F385D43
Finished CoreStorage operation on disk0
bash-3.2# diskutil cs resizevolume ADFEA6C1-18D8-4705-8006-9641BC2B7C6F 380220544k
The Core Storage Logical Volume UUID is ADFEA6C1-18D8-4705-8006-9641BC2B7C6F
Started CoreStorage operation
Checking file system
...
Growing Logical Volume
Resizing Core Storage Logical Volume structures
Resized Core Storage Logical Volume to 389345837056 bytes
Growing file system
Finished CoreStorage operation
bash-3.2# diskutil cs list
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 0BE79B93-86D9-41DE-9071-D9DD933037CD
=========================================================
Name: Macintosh HD
Status: Online
Size: 398690140160 B (398.7 GB)
Free Space: 8740311040 B (8.7 GB)
|
+-< Physical Volume AD5882F6-6210-41CA-8F9E-76F6E3CA44E9
| ----------------------------------------------------
| Index: 0
| Disk: disk1s2
| Status: Online
| Size: 278999990272 B (279.0 GB)
|
+-< Physical Volume E2664618-2492-4B13-905D-57D92F385D43
| ----------------------------------------------------
| Index: 1
| Disk: disk0s2
| Status: Online
| Size: 119690149888 B (119.7 GB)
|
+-> Logical Volume Family 61E88BCC-060F-46DF-97F2-E15926D8D192
----------------------------------------------------------
Encryption Status: Unlocked
Encryption Type: None
Conversion Status: NoConversion
Conversion Direction: -none-
Has Encrypted Extents: No
Fully Secure: No
Passphrase Required: No
|
+-> Logical Volume ADFEA6C1-18D8-4705-8006-9641BC2B7C6F
---------------------------------------------------
Disk: disk2
Status: Online
Size (Total): 389345837056 B (389.3 GB)
Conversion Progress: -none-
Revertible: No
LV Name: Macintosh HD
Volume Name: Macintosh HD
Content Hint: Apple_HFS
All seemed good, I had a single logical volume spanning across HDD and SSD.
But... I've been using it extensively for several days now, and strangely enough SSD is never used for reads... there are only a few writes to SSD every now and then, but still all the major processing is done via HDD.
I expected it to be so for the first time while the SSD is being filled with new/frequently used data, but even when I write new files they tend to go to HDD rather than SDD. To test that I created 100MB files, and while the HDD was not full all writes were going to HDD.
So my questions are:
- Does it matter in which order physical volumes are listed in Corestorage logical volume group setup? How Corestorage chooses which drive is the best for immediate writes? Since it frees up some space on SSD when working on a genuine FusionDrive, it should know that it is "better" to do immediate writes on SSD rather than HDD.
- Is there a way to "change priority" of physical drives within logical volume group? I assumed CoreStorage would "know" that SSD is a faster drive...
Thanks
Solution 1:
Q1:
Yes, it seems that the order of disks is important.
According to the post of Jiri Hracek
here: http://blog.macsales.com/17624-os-x-10-8-3-provides-fusion-drive-setup-option-for-non-fusion-drive-equipped-macs
if you put the SSD at the second place, Fusion Drive is not working at all...
Thus, one possible way that Fusion Drive works it that is takes the first drive as the faster one, frees up spaces in the first one, and put the files in the second...
Q2:
it seems that there is not... So your only choice seems to be recreating the Fusion Drive from scratch. Besides, I looked at my own SSD-HDD Fusion Drive, its order is SDD @ first as well...
Solution 2:
I'm two years late and who-knows-how-many dollars short at this point, but I just ran into this problem as well, and the solution above worked for me. I've documented all my steps in this gist
My backstory: when trying to wipe an iMac whose drive had been partitioned with Boot Camp, the new Disk Utility GUI beachballed and upon restart, the fusion drive had separated. I followed advice from SO to re-fuse the drive, but inadvertently put the HDD in front of the SSD.
tl;dr these steps worked:
- Run
diskutil list
and grab the name of the physical SSD & HDD (disk3
anddisk4
in my case) - Run
diskutil cs create "imac-fusion" disk3 disk4
, with the name of the SSD in front of the HDD (this must be where I messed up last time) - Run
diskutil cs list
and note the ugly GUID string of the newly created "Logical Volume Group", which in my case wasDD1F3A9F-7171-4FDF-9994-9453A4C95109
- Run
diskutil cs createVolume "DD1F3A9F-7171-4FDF-9994-9453A4C95109" jhfs+ "Macintosh HD" 100%
I just restored with Super Duper! and it works!