These instructions shows how to merge an original iMac Fusion drive that for some (installing Windows, messing with Disk Utility) was split into separate SSD and HDD drives.
Warning: performing below steps will irrecoverably wipe both SSD and HDD drives. Make sure you have all your data backed up.
- Boot iMac into Recovery Mode (press Alt+Cmd+R at startup).
- Open Terminal and run diskutil cs list. If no logical volumes are shown, skip to the next step. Otherwise, copy long IDs (lvUUID) and then delete all logical volumes by running command diskutil cs deleteVolume lvUUID. Then delete all logical volume groups by running diskutil cs delete LVGUUID.
- Open Disk Utility and erase both drives. Give them appropriate names (i.e. SSD and HDD) and format in OS X Extended (Journaled). Note total capacity of both drives.
- Open Terminal and run diskutil list. Note Identifiers of your SSD and HDD drives. You can use Name and Size columns to help determine which entries are the correct ones. Most likely they will be disk0s2 and disk1s2.
- Run diskutil cs create "Macintosh HD" disk0s2 disk1s2 (or other disk identifiers from stop 4). Copy LVG UUID displayed in the command output.
- Run diskutil cs CreateVolume LVGUUID jhfs+ "Macintosh HD" 100% (LVGUUID is the string copied in previous step).
- Open Disk Utility and make sure you now have a single Fusion drive with total storage capacity of combined HDD and SSD drives.
- Re-install Mac OS X.
iMac 27'' 5K (Late 2014)
Mac OS Sierra (10.12.5)