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 Science Behind Social Media Posting Times

In today's digital landscape, timing is everything. Whether you're a social media manager, business owner, or content creator, the success…

6 days ago

Mastering Google Search Console: Tips for New Users

Are you a website owner? Maintaining the website is the prime concern for any website owner. Yes, it’s equally important…

1 week ago

A Comprehensive Guide to Changing and Protecting the WordPress Login URL

If you’ve planned to launch a WordPress website, you might get a question, “How do I log in to WordPress?”…

2 weeks ago

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:…

1 month 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…

1 month ago