I think I messed up the Fusion Drive on my 2TB iMac I want to ask you how can I get back together my Fusion Drive (merge HDD and SSD together). I was installing Windows 10 and during installation it crashed and I was not able to boot in Windows neither OS X. I also lost recovery partition, so I am going to install it with internet recovery or with my installed OS X on my external HDD. Thanks for any advice
Preparation:


Detach any external drive (especially your external Time Machine backup drive)
Restart to Internet Recovery Mode by pressing alt cmd R at startup.
The prerequisites are the latest firmware update installed, either ethernet or WLAN (WPA/WPA2) and a router with DHCP activated.
On a 50 Mbps-line it takes about 4 min (presenting a small animated globe) to boot into a recovery netboot image which usually is loaded from an apple/akamai server.

I recommend ethernet because it's more reliable. If you are restricted to WIFI and the boot process fails, just restart your Mac until you succeed booting.

Alternatively you may start from a bootable installer thumb drive (preferably Yosemite or El Capitan) or a thumb drive containing a full system (preferably Yosemite or El Capitan).


Rebuild Fusion Drive

All data on the disks will be deleted.


Booted to Internet Recovery Mode open Utilities → Terminal in the menubar and enter:
diskutil cs list to get a CoreStorage listing.  
Copy the Logical Volume UUIDs one by one, if any are listed.  
Now delete all Logical Volumes with diskutil cs deleteVolume LVUUID.  
Copy the Logical Volume Group UUID, if any is listed. It's the first listed in the listing of diskutil cs list.  
Then delete the Logical Volume Group with diskutil cs delete LVGUUID. 
Enter exit and quit Terminal
Open Disk Utility. Enter 'Ignore' if you are asked to fix the drives.
Choose your SSD and erase it: 1 Partition Mac OS X Extended (Journaled), GUID Partiton table and hit Erase.
Please check that the size is ~121 GB  

Example:  


Choose your HDD and erase it: 1 Partition Mac OS X Extended (Journaled), GUID Partiton table and hit Erase.
Please check that the size is ~2 TB  

Example:  


Quit Disk Utility and open Terminal
Enter diskutil list

Example (your disk identifiers and sizes are different of course: Your volume SSD probably has the Identifier disk0s2 and the size 121 GB and your volume HDD probably has the Identifier disk1s2 and the size 2.0 TB):


Enter diskutil cs create "Name" IdentifierSSD IdentifierHDD
In your case probably diskutil cs create "Macintosh HD" disk0s2 disk1s2.  

Copy the resulting LVGUUID

Example: 


Enter diskutil cs CreateVolume LVGUUID jhfs+ "Macintosh HD" 100%.

Example:


Enter diskutil cs list
Check the size of your Logical Volume. It should have the size ~1.121 TB
Quit Terminal
Open Disk Utility and check your newly created volume for errors
Quit Disk Utility
Open Restore OS X. Install and configure OS X. The original OS X your Mac came with will be installed.
After configuring OS X, download the newest available system installer with App Store and upgrade your system.