
In our last article we have created a raid device md0 from three hard disk partition. In this article we would manage raid device. This guide is the second part of our tutorial on raid device if you have missed first part then read that first.
How to create raid partition in Linux example and implementations
Verify that all raid partition which we have created in our pervious article are working properly and in active state.
#mdadm --detail /dev/md0
![]()

You can also use cat /proc/mdstat command to see run time status of raid device

raid devices are mainly used for data backup. Data will be safe even if any hard disk get fail from raid device. To test it first copy some data in /data directory which is the mount point of md0 raid devices.
#cp * /data #ls /data
Now assume that one hard disk form raid device gets fail. This can be done by mdadm command with --fail options. Verify data it should be safe

you can verify fail device status via mdadm commands with -- detail switch also
![]()

run time process can be checked via cat /proc/mdstat commands

At this point you should have understand what exactly raid device do?. raid device keep your data safe even if hard disk got crashed. its give you enough time to replace faulty hard disk without losing data.
Now remove faulty devices.[ Note:- you must have to set fail status before removing it form raid devices ]

now replace faulty hard disk with good one. To add new disk in raid devices use --add options with mdadm commands

Congratulations you have successful created raid device and changed faulty hard disk. We suggest you to clean these partition before doing further practical.
First un-mount the raid partitions from /data directory
![]()
Now stop /md0 devices and remove it form mdadm commands

Now remove entry form /etc/fstab
![]()

use fdisk command to remove raid partition form hard disk

Search more about
Search in Google for
