We have two disks sd0
and sd1
. First, we need to prepare our disks.
$ doas fdisk -iyg sd0
$ doas fdisk -iyg sd1
Then, create RAID partitions:
$ printf "a\n\n\n\nRAID\nw\nq\n" | doas disklabel -E sd0
$ printf "a\n\n\n\nRAID\nw\nq\n" | doas disklabel -E sd1
Next, create RAID:
$ doas bioctl -c 1 -l sd0a,sd1a softraid0
A new disk will be created sd2
. Again, initialize this new disk:
$ doas fdisk -iyg sd2
$ printf "a\n\n\n\nRAID\nw\nq\n" | doas disklabel -E sd2
Next, make an encrypted device:
$ doas bioctl -c C -l /dev/sd2a softraid0
Another disk sd3
is created. Let's initialize it:
$ doas fdisk -iyg sd3
$ printf "a\n\n\n\n\nw\nq\n" | doas disklabel -E sd3
and make a new file system on it:
$ doas newfs /dev/rsd3a
Now, we can mount our encrypted device:
$ doas mount /dev/sd3a /data