Firstly, identify the device names for your new hard drives by running sudo fdisk -l. In my case, the new drives were /dev/sdc and /dev/sdd. OR (First to find the drive you want to open, use “ls -l /dev | grep sd” to list drives and their partitions; this is to allow you to see if what drives are already partitioned. Also use “lsscsi and “lsblk” for as a different way to see disk drives and their partitions, or use fdisk -l) Then create the partition on each drive. The partition table needs to be GPT to allow more than 2TB to be used, so you cannot use fdisk.

  1. Run parted /dev/sdc. (or… parted -a optimal /dev/sdc, this is for correct alignment)
  2. At the (parted) prompt, create the partition table by typing mklabel gpt.
  3. Check the free space on the drive by typing print free. In my case, this shows 3001GB.
  4. Create the partition by typing mkpart primary 1M 3001GB. This starts the partition a 1M offset giving a 4096 byte alignment. This may or may not be necessary, but won't hurt if its not. (or… mkpart primary 0% 100% for correct alignment)
  5. Check your partition is set up by typing p. Then type q to quit.
  6. Encrypt it using LUKS: cryptsetup luksFormat /dev/devicename
  7. Name the encrypted partition: cryptsetup luksOpen <Partition Disk> <Name given to partition>
  8. Format the encrypted partition with XFS: mkfs.xfs /dev/mapper/<Name given to partition>
  9. Set the label of the XFS volume: xfs_admin -L newName /dev/mapper/<Name given to partition>
  10. Close the encrypted volume so it can be used by other users when inserted: cryptsetup luksClose <Name given to partition>
  11. chmod 777 the mounted volume so any user can access it (this is really only for SD cards and USB flash drives that might switch systems).