📜 ⬆️ ⬇️

Moving to Fusion Drive (Mac OS X Mavericks)



UPDATE: From one of the readers received information that collected by this method, FD does not work properly - does not transfer frequently used files to the SSD. Perhaps this is an exceptional case, but I will check the relevance of the article for modern macOS. Well, for those who decide to use the article, I recommend having a backup of the system and data to be able to create an FD from scratch in my first article , if something goes wrong.

In the article Go to Fusion Drive, I outlined ways that are associated with the loss of information on experimental discs. Fortunately, the opportunity to avoid this has recently appeared.

')
I finished my previous article on Fusion Drive with a somewhat sad remark about the impossibility of creating FD on the fly, without the need to transfer data from disks. It was impossible to manipulate the disks (add and delete) in the created FD. Fortunately, the situation has changed in Mac OS X Mavericks. Thanks to Apple engineers.

Used hardware and software:


I did all the operations on the virtual machine, since Real work for a long time with FD.
Before you start converting the disk, make sure that you have a backup of the system!

System before upgrading
bash-3.2# diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *42.9 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Macintosh HD 42.6 GB disk0s2 


Prepare an existing disk partition disk0s2 for FD.
 bash-3.2# diskutil cs convert disk0s2 Started CoreStorage operation on disk0s2 Macintosh HD Resizing disk to fit Core Storage headers Creating Core Storage Logical Volume Group Attempting to unmount disk0s2 Switching disk0s2 to Core Storage Couldn't unmount disk0s2; converted volume won't appear until it's unmounted Core Storage LVG UUID: 59142646-86FC-4E01-983F-43E167B23D45 Core Storage PV UUID: 6EF1FB47-1953-45D0-976A-4B99A5809C10 Core Storage LV UUID: 29DC7C2D-3D59-4029-AE68-25404CD45D7A Finished CoreStorage operation on disk0s2 Macintosh HD 


The system reports that the disk is converted, but will appear after unmounting. Checking the new configuration:
 # diskutil cs list CoreStorage logical volume groups (1 found) | +-- Logical Volume Group 59142646-86FC-4E01-983F-43E167B23D45 ========================================================= Name: Macintosh HD Status: Offline Size: 0 B (0 B) Free Space: -none- | +-< Physical Volume 6EF1FB47-1953-45D0-976A-4B99A5809C10 ---------------------------------------------------- Index: 0 Disk: disk0s2 Status: Checking Size: 42605699072 B (42.6 GB) 


Reboot and simultaneously add a 5GB virtual disk to expand disk space.

 # diskutil cs list CoreStorage logical volume groups (1 found) | +-- Logical Volume Group 59142646-86FC-4E01-983F-43E167B23D45 ========================================================= Name: Macintosh HD Status: Online Size: 42605699072 B (42.6 GB) Free Space: 16777216 B (16.8 MB) | +-< Physical Volume 6EF1FB47-1953-45D0-976A-4B99A5809C10 | ---------------------------------------------------- | Index: 0 | Disk: disk1s2 | Status: Online | Size: 42605699072 B (42.6 GB) | +-> Logical Volume Family 6F8A2C40-860F-411A-B4D0-9BA2380504FB ---------------------------------------------------------- Encryption Status: Unlocked Encryption Type: None Conversion Status: NoConversion Conversion Direction: -none- Has Encrypted Extents: No Fully Secure: No Passphrase Required: No | +-> Logical Volume 29DC7C2D-3D59-4029-AE68-25404CD45D7A --------------------------------------------------- Disk: disk2 Status: Online Size (Total): 42270150656 B (42.3 GB) Conversion Progress: -none- Revertible: Yes (no decryption required) LV Name: Macintosh HD Volume Name: Macintosh HD Content Hint: Apple_HFS 


We see that the system has activated the FD disk and uses it. The added virtual disk was named disk0, the converted disk was disk1, the combined FD disk was disk2.
 # diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: *5.4 GB disk0 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *42.9 GB disk1 1: EFI EFI 209.7 MB disk1s1 2: Apple_CoreStorage 42.6 GB disk1s2 3: Apple_Boot Boot OS X 134.2 MB disk1s3 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: Apple_HFS Macintosh HD *42.3 GB disk2 


We look parameters of start of not documented command
 # diskutil cs addDisk Usage: diskutil coreStorage addDisk lvgUUID NewMemberDeviceName Add a new physical volume to a CoreStorage logical volume group. Ownership of the affected disks is required. Example: diskutil coreStorage addDisk 11111111-2222-3333-4444-555555555555 disk4s2 


Run the command to add the disk0 disk to LVG 59142646-86FC-4E01-983F-43E167B23D45
 bash-3.2# diskutil cs adddisk 59142646-86FC-4E01-983F-43E167B23D45 disk0 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: 4C255180-5FDD-4BF8-8CAD-EFA5F1B5C0B8 Finished CoreStorage operation on disk0 


Checking what happened
 # diskutil cs list CoreStorage logical volume groups (1 found) | +-- Logical Volume Group 59142646-86FC-4E01-983F-43E167B23D45 ========================================================= Name: Macintosh HD Status: Online Size: 47630434304 B (47.6 GB) Free Space: 4756291584 B (4.8 GB) | +-< Physical Volume 6EF1FB47-1953-45D0-976A-4B99A5809C10 | ---------------------------------------------------- | Index: 0 | Disk: disk1s2 | Status: Online | Size: 42605699072 B (42.6 GB) | +-< Physical Volume 4C255180-5FDD-4BF8-8CAD-EFA5F1B5C0B8 | ---------------------------------------------------- | Index: 1 | Disk: disk0s2 | Status: Online | Size: 5024735232 B (5.0 GB) | +-> Logical Volume Family 6F8A2C40-860F-411A-B4D0-9BA2380504FB ---------------------------------------------------------- Encryption Status: Unlocked Encryption Type: None Conversion Status: NoConversion Conversion Direction: -none- Has Encrypted Extents: No Fully Secure: No Passphrase Required: No | +-> Logical Volume 29DC7C2D-3D59-4029-AE68-25404CD45D7A --------------------------------------------------- Disk: disk2 Status: Online Size (Total): 42270150656 B (42.3 GB) Conversion Progress: -none- Revertible: No LV Name: Macintosh HD Volume Name: Macintosh HD Content Hint: Apple_HFS 


Please note that now we have two physical volumes in the volume group (Physical Volume), but the system so far only uses the first one and there is 5GB of free space.
Now it is necessary to expand the Logical Volume 29DC7C2D-3D59-4029-AE68-25404CD45D7A to the maximum possible size Size: 47630434304 B (47.6 GB).

Theoretically, the team should work
 bash-3.2# diskutil cs resizevolume 29DC7C2D-3D59-4029-AE68-25404CD45D7A 47630434304B 


In my case, an error was reported about insufficient free space. I translated 47630434304B to kilobytes and launched
 bash-3.2# diskutil cs resizevolume 29DC7C2D-3D59-4029-AE68-25404CD45D7A 46514096k The Core Storage Logical Volume UUID is 29DC7C2D-3D59-4029-AE68-25404CD45D7A Started CoreStorage operation Checking file system ... Growing Logical Volume Resizing Core Storage Logical Volume structures Resized Core Storage Logical Volume to 46514094080 bytes Growing file system Finished CoreStorage operation 


When testing on another virtual machine, everything worked when I specified the size in bytes and the disk was created as large as possible. Apparently it's about the size of the disks. You can try to run the command by gradually reducing the size in bytes or as I did.

Total
 # diskutil cs list CoreStorage logical volume groups (1 found) | +-- Logical Volume Group 59142646-86FC-4E01-983F-43E167B23D45 ========================================================= Name: Macintosh HD Status: Online Size: 47630434304 B (47.6 GB) Free Space: 512348160 B (512.3 MB) | +-< Physical Volume 6EF1FB47-1953-45D0-976A-4B99A5809C10 | ---------------------------------------------------- | Index: 0 | Disk: disk1s2 | Status: Online | Size: 42605699072 B (42.6 GB) | +-< Physical Volume 4C255180-5FDD-4BF8-8CAD-EFA5F1B5C0B8 | ---------------------------------------------------- | Index: 1 | Disk: disk0s2 | Status: Online | Size: 5024735232 B (5.0 GB) | +-> Logical Volume Family 6F8A2C40-860F-411A-B4D0-9BA2380504FB ---------------------------------------------------------- Encryption Status: Unlocked Encryption Type: None Conversion Status: NoConversion Conversion Direction: -none- Has Encrypted Extents: No Fully Secure: No Passphrase Required: No | +-> Logical Volume 29DC7C2D-3D59-4029-AE68-25404CD45D7A --------------------------------------------------- Disk: disk2 Status: Online Size (Total): 46514094080 B (46.5 GB) Conversion Progress: -none- Revertible: No LV Name: Macintosh HD Volume Name: Macintosh HD Content Hint: Apple_HFS 


All successful transition to Fusion Drive!

Source: https://habr.com/ru/post/200362/


All Articles