learn how to encrypt an appleraid volume using corestorage to make it accessible as an encrypted time machine backup destination. please have a copy/backup of all your files on hand before following the steps mentioned here, otherwise you will loose data.

create appleraid volume

first, open up terminal from utilities folder and enter diskutil list to get an overview of your physical hard drives and identify those drives you want to use in your raid set.

[]$ diskutil appleraid create stripe TimeMachineRAID jhfs+ disk3 disk4

i decided to name the raid set TimeMachineRAID and it should consist of two drives: disk3 and disk4, striped to get a volume sized the sum of each hard drive. once the operation finished it's status can be checked using command diskutil appleraid list:

[]$ diskutil appleraid list
AppleRAID sets (1 found)
Name:                 TimeMachineRAID
Unique ID:            3E0E91BA-C434-11E5-8831-AC575671DD9F
Type:                 Stripe
Status:               Online
Size:                 4.0 TB (4000109887488 Bytes)
Rebuild:              manual
Device Node:          disk5
#  DevNode   UUID                                  Status     Size
0  disk3s2   82B0A466-C434-11E5-ACE5-E28F2AEC0665  Online     2000054943744
1  disk4s2   985E9B88-C434-11E5-9E0F-B4B1B9876117  Online     2000054943744

create logical volume group

next step, creating the logical volume group is done using command diskutil cs create TimeMachineCoreStorage disk5. it's name is TimeMachineCoreStorage, and disk5 the volume (the appleraid volume from above) to be added to the new volume group.

[]$ diskutil cs create TimeMachineCoreStorage disk5
Started CoreStorage operation
Unmounting AppleRAID set at disk5
Adding disk5 to Logical Volume Group
Creating Core Storage Logical Volume Group
Switching disk5 to Core Storage
Waiting for Logical Volume Group to appear
Discovered new Logical Volume Group "F14992F2-C434-11E5-8F06-AC575671DD9F"
Core Storage LVG UUID: F14992F2-C434-11E5-8F06-AC575671DD9F
Finished CoreStorage operation

create logical volume using lvg uuid

volume name should be Time Machine, using logical volume group F14992F2-C434-11E5-8F06-AC575671DD9F (yours will be different).

[]$ diskutil cs createvolume F14992F2-C434-11E5-8F06-AC575671DD9F jhfs+ Time\ Machine 100%
Started CoreStorage operation
Waiting for Logical Volume to appear
Formatting file system for Logical Volume
Initialized /dev/rdisk6 as a 4 TB case-insensitive HFS Plus volume with a 311296k journal
Mounting disk
Core Storage LV UUID: 22DB72FE-C435-11E5-9EF7-B4B1B9876117
Core Storage disk: disk6
Finished CoreStorage operation

finally add encryption

taking the volume uuid 22DB72FE-C435-11E5-9EF7-B4B1B9876117, these are the command and output adding encryption:

[]$ diskutil cs encryptvolume 22DB72FE-C435-11E5-9EF7-B4B1B9876117
New passphrase for existing volume:
Confirm new passphrase:
The Core Storage Logical Volume UUID is 22DB72FE-C435-11E5-9EF7-B4B1B9876117
Started CoreStorage operation on disk6 Time Machine
Scheduling encryption of Core Storage Logical Volume
Core Storage LV UUID: 22DB72FE-C435-11E5-9EF7-B4B1B9876117
Finished CoreStorage operation on disk6 Time Machine
main picture by alejandro escamilla, license