Core Linux

Manage your software RAIDs

RAID: You must know about RAIDs if you are in hosting industry. As client or as an server admin. As a client, we must have idea about various types of RAIDs with their functionality and advantages-disadvantages then n then only we can choose best server hardware for us. Sysadmin must know the RAID administration part, to provide best quality support to premium clients.

RAID types: Basically, there are 2 types of RAIDs available.

1. Hardware Raid : Its managed by hardware RAID controller.

Eg. 3ware/Sas/Megasas/Adaptec etc.

2. Software Raid : Its managed by/throgh OS.

Now, how to manage software raids.

In this article we will learn about points,

1. Check existing software RAID configuration.
2. How to create a new RAID device.
3. Replacing a faulty device.
4. How to add device existing array.
5. Deactivating and removing an existing RAID device.

1. cat /proc/mdstat : All presently active RAID devices are stored in the /proc/mdstat file. With this command we can check our existing RAID type. It will show the list of devices.

2. mdadm –query /dev/md2 : To see more informaiton about the RAID device. To display more detailed information, use the following command,
# mdadm –detail /dev/md2

3. Steps to create new software raid device.

Make sure that your server is having two unused disk drives available,
# mdadm –create /dev/md2 –level=1 –raid-devices=1 /dev/sdc1 /dev/sdd1

4. Replacing a faulty device. To do so, first mark the /dev/sdb1 device as faulty:

# mdadm /dev/md2 –fail /dev/sdb1

Then remove it from the RAID device:

# mdadm /dev/md2 –remove /dev/sdb1

As soon as the hardware is replaced, you can add the device back to the array by using the following command:

# mdadm /dev/md2 –add /dev/sdb1

5. Extending a RAID Device

# mdadm /dev/md2 –add /dev/sdc1
# mdadm –grow /dev/md2 –raid-devices=2

6. Removing a RAID Device first deactivate it by running the following command as

#mdadm –stop raid_device
#mdadm –remove raid_device

7. Removing a RAID device

# mdadm –detail /dev/md2

First stop it by typing the following at a shell prompt before removing it

# mdadm –stop /dev/md2

After that you can remove it using command

# mdadm –remove /dev/md3


HR-ADMIN

Recent Posts

The Ultimate Showdown: Linux vs Windows for VPS Hosting

As the demand for virtual private servers (VPS) continues to grow, businesses and individuals are faced with a crucial decision:…

2 weeks ago

Questions to Ask Your Web Hosting Support Team

Web hosting is a large industry, as many other factors help any web hosting provider to form a company. The…

2 weeks ago

How to Secure Your WordPress Site in 2025

Welcome to the complete guide to WordPress security best practices in 2024. As technology evolves rapidly, implementing strong security measures…

3 weeks ago

Unlocking the Secrets of Hosting: Essential Questions to Ask Hostripples

Hey, wanted to learn about web hosting? Or do you want to start a new website and need hosting? Questions…

3 weeks ago

DDoS Attacks: What You Need to Know for Protection

In today's digital world, the threat of DDoS attacks has become increasingly prevalent. These types of attacks have the power…

1 month ago