Tag Archives: quick raid0 and drive encryption on centos command line how to

Quick RAID0 and Drive Encryption on CentOS command line How To.

list drives by typing fdisk -l
create a primary partition and make it Linux Raid Auto partition for each drive.
fd = Linux raid auto

fdisk /dev/sdb
1. type n for new
2. type p for primary
2. 1 for first partition
3. T for type
4. fd for Linux Raid Auto

5. do this for all the drives you want to include.

6. fdisk /dev/sdc
then follow the steps above
7. fdisk /dev/sdd
then follow steps above.

Create the raid0 partition (Raid0 is no redundancy but adds the space together.
mdadm –create –verbose /dev/md0 –level=0 –raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1

setup the encryption and the encryption password.
cryptsetup -c aes-cbc-essiv:sha256 -y -s 256 luksFormat /dev/md0 cryptsetup luksOpen /dev/md0 burn

Format the newly created raid0 partition
mkfs -t ext3 /dev/mapper/burn

Make directory to mount new partition
mkdir /raid0
Mount the new raid0 partition.

mount /dev/mapper/burn /raid0

Done deal! Your now have setup a drive with encryption and a Raid0 partition. It does require a password to mount the drive.