Five disks, 6TB each. Adjust as needed.
Reset the disks.
for f in /dev/sd[abcde]; do
sudo dd if=/dev/zero of=$f bs=512 count=1 conv=notrunc
doneCreate the RAID array.
sudo dmraid -f isw -C store0 --type 5 --strip 128k --disk "/dev/sda,/dev/sdb,/dev/sdc,/dev/sdd,/dev/sde"
sudo dmraid -sThe last command lists the RAID sets. Output is something like the following.
*** Group superset isw_bcghhjfffj
--> Active Subset
name : isw_bcghhjfffj_store0
size : 12524192768
stride : 256
type : raid5_la
status : ok
subsets: 0
devs : 5
spares : 0
Copy the set ID from the output before continuing.
sudo dmraid -ay isw_bcghhjfffj_store0
sudo cryptsetup luksFormat /dev/mapper/isw_bcghhjfffj_store0Enter a password when requested. Remember this password!
sudo cryptsetup luksOpen /dev/mapper/isw_bcghhjfffj_store0 crypt0Enter the password when requested to open the partition.
sudo mkfs.btrfs -f /dev/mapper/crypt0Now mount it.
mkdir -p /data
sudo mount /dev/mapper/crypt0 /data