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

Updated cPanel License Price in Jan 2025: A Comprehensive Guide

Are you ready for another cPanel price adjustment? As we have approached January 2025, cPanel has rolled out significant changes…

2 weeks ago

Finding Your Fit: Website Builder or WordPress for Your Site?

In this growing digital world, having a website is not enough—it’s a crucial and much-needed option. But here's the challenge…

2 weeks ago

From Hobbyist to Professional: Selling Photos Online

In today's digital age, the line between hobby photography and professional photography has become increasingly blurred. With the rise of…

3 weeks ago

Windows Web Hosting: Essential Insights for Beginners

Are you taking your first steps into the world of web hosting? You're not alone. Every day, countless individuals and…

3 weeks ago

Crafting a Professional Email: Step-by-Step Guide

Due to growing digitalization, Email Communication has become the backbone of professional interactions. Yet, surprisingly, many professionals struggle to craft…

1 month ago