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 Guide to WordPress Maintenance: Tips and Tricks

When you’re running a business that relies on website traffic and sales to succeed. Then you need to keep it…

1 week ago

Migrate In 2024: Our Comprehensive Website Migration Manual to the Next Level

Migration! Yes, this word is very big in the web hosting industry and it has its importance. Especially for businesses…

1 week ago

Unveiling the Importance of Server Maintenance Plans: A Comprehensive Guide

The server is the backbone of the web hosting industry and it acts like a HERO in the web hosting…

2 weeks ago

IP Address is Blocked? A handpicked list of Solutions to Fix it?

Imagine you are on holiday having a cup of tea and browsing your website or blog.Then, what next?You will get…

4 weeks ago

Explained: Difference between Nameservers Vs. DNS

The web hosting industry is growing every minute, day, and year. It has many terminologies that are important to understand…

1 month ago