Linux 101 : Setting up a RAID5 device



MDADM is the raid array utility for multiple disks administration.
We install it on our system as follows:


We need to pick the disks that we are going to use in the disk array
We can check our disk using the below:


To make sure that our disks didn't have any previous data in their superblock, we can erase their superblock using the below command:


Then, we create our raid 5 using the above disks:


This will create a virtual device - /dev/md0 - that will represent our raid device.

To get statistics about our device - parity calculations/building for example -:


We can check our raid device using the below command:


To use our raid device, we will need to:
  • format it using the ext4 filesystem.
  • create a mountpoint
  • mount our device on it.

We could check our device using the below command:


To check the status of our raid device, we use:


To ensure that the device will be mounted at boot time, we need to add configuration data it in the below files:

/etc/mdadm/mdadm.conf:


/etc/fstab:



Comments

Leave as a comment:

Archive