dcsimg

Software RAID on Linux with mdadm

Now that we've completed our initial examination of the basics of RAID levels (including Nested RAID) it's time to turn our attention to RAID functionality on Linux using software. In this article we will be discussing mdadm -- the software RAID administration tool for Linux. It comes with virtually every Linux distribution and has some unique features that many hardware RAID cards don't.

RAID Controllers

We’ve spent a great deal of time examining various RAID levels such as RAID-0, 1, 5, and 6, and Nested RAID levels such as RAID-10, 50, 51, 61, and 60 or even the more complicated RAID-100 or RAID-160. In all of these discussions we have assumed there was a RAID “controller” that performed the various RAID operations. This includes sending chunks of data to the appropriate disks, computing parity, hot-swapping, disk fail-over, checking read transactions to determine if the read was successfully and if not, declaring that disk as “down”, plus other important tasks related to RAID. All of these tasks require some sort of computation and have to be performed by a RAID controller.

You really have two options for RAID controllers: (1) a dedicated RAID controller such as those on add-in RAID cards, (2) software RAID that uses the CPU for RAID chores. In the first case you have a dedicated RAID controller, typically on an add-in RAID card but it can be on a motherboard, that performs the necessary RAID computations. This controller typically uses a dedicated lower power processor, often a real-time processor such as a PowerPC, to perform the computations. Typically these controllers are put on an add-in card and you plug the drives you want in the RAID array into the card.

With software RAID, all the RAID functions run on the CPU. Pretty much all Linux distributions comes with software RAID in the form of md (Multiple Device) which is a driver within Linux that provides virtual devices created from one or more underlying devices (e.g. storage block devices). Plus the great thing is that it comes with almost all Linux distributions so you have access to the source (plus the price isn’t too bad either and it has a great deal of functionality). In addition, you can create Nested RAID configurations as needed since all RAID functions are in software (I smell a Triple Lindy coming).

One thing you have to be very careful about is what is commonly called a fakeRAID card or fakeRAID controller. FakeRAID is not hardware RAID because there is no dedicated RAID controller. Rather, they use a standard disk controller chip on an add-in card or motherboard, with some specialized firmware and drivers. At boot-time they run a special application that allows users to configure disks attached to the fakeRAID as a RAID group. But the RAID processing is really handled by the drivers which are run on the CPUs (so the CPU provides the computational power). Consequently, it’s really a software RAID solution and not hardware RAID (hence the name “fakeRAID”).

There is a great deal of discussion and grinding of teeth within the Linux community about fakeRAID. One point of the discussions is that the vendors of fakeRAID don’t tell customers that what they are actually buying is not a RAID card with a dedicated RAID controller, but rather a simple card with a disk controller coupled with drivers that use the CPU for RAID processing (false advertising). Plus there is the additional problem of developing and supporting drivers for Linux to allow these fakeRAID cards to be used. Moreover, there is a strong argument that it is probably better to use software RAID that comes with Linux (md) since it is already part of Linux and can arguably give you better performance.

However, if you want to use software RAID that comes with Linux in the kernel (md), you still need some tools to control/manage/monitor the software RAID arrays. That’s where mdadm comes in. This article will do a brief examination of mdadm and some of its options.

Introduction to mdadm

Mdadm is a software tool primarily written by Neil Brown that allows you to create, assemble, report on, grow, and monitor RAID arrays that use software RAID in Linux. Actually according to the documentation there are seven modes of operation:


  1. Create
  2. Assemble
  3. Follow or Monitor
  4. Build
  5. Grow
  6. Manage
  7. Misc

We’ll walk through these various modes of operation but the focus of this article is an introduction and not an in-depth HOWTO. You can find those types of articles on the web.

The first step in using mdadm, or any RAID for that matter, is to PLAN your RAID configuration carefully. Personally I like to work backwards starting with the purpose of the storage. Will it be used for a database? Will it be used for /home? Will it be used for high-speed scratch? Will it be used for data that requires a very high degree of reliability? Understanding the intent of the storage is really the key to creating the RAID configuration you need/want. Once you determine the storage use case, you need to develop an idea of how much I/O performance you need (throughput and IOPS) and the general ratio of read and write performance. You should also develop an idea of how much data redundancy you need for the storage.

Once you have an idea of the performance and redundancy of the array you can select the RAID configuration you think you might need. I would suggest you select a few candidate RAID configurations and then do some more reading/research on each one and select the RAID configuration that seems to be best. During this research be sure to examine the redundancy as well as the performance of the various RAID configurations and compare them to your estimations. But also be sure to examine the capacity and storage efficiency of each level. You may love the performance and storage efficiency of RAID-10 but the data redundancy may not be enough for you. Or you may love the data redundancy of RAID-61 but you may not willing to give up the performance or, perhaps more importantly, you may not be willing to have such low storage efficiency (especially if this is for your home system).

But just choosing the RAID configuration you want is not the end of your planning. You need to also consider a number of other things. Perhaps the most important thing you need to consider is if you will need to grow/shrink the storage. The reason this is important is because you are likely to have to use LVM (Logical Volume Manager) either on top of Linux software RAID or underneath it. This forces you to carefully consider how to build both LVM and software RAID and how you expand either one or both. I would recommend walking through the expansion steps to make sure you understand how to do it (you could even pass along your ideas to someone else to have another pair of eyes examine them).

One other thing you should consider before implementing your well formulated and thought-out RAID plan is the file system that sits on top of the storage. Based on your usage model for the storage, select one or two candidate file systems. Then do some research on each one to find out what problems or limitations exist, and also how you can optimize each file system for better performance (we’re all performance junkies at heart). There are a number of articles on the web that discuss tuning file systems with Linux software RAID.

Assuming that you have done your careful planning (including a backup solution), let’s move on to the first “mode” of mdadm, Creating a RAID array.

Creating a RAID array

Mdadm allows you to create a RAID array using Linux block devices. During the creation of the array, per-device superblocks are created for the RAID array (allows for the array to be assembled correctly). Using the “create” mode is the most common method for building the array and is recommended if you are just starting to use mdadm.

The basic mdadm command for creating a RAID array is fairly simple with the following generic command and typical options.

mdadm --create [md-device] --chunk=X --level=Y --raid-devices=Z [devices]


where the options are as follows:


    -c, –chunk= Specify chunk size in kibibytes. The default is 64.


    -l, –level= Set raid level, options are: linear, raid0, 0, stripe, raid1, 1, mirror, raid4, 4, raid5, 5, raid6, 6, raid10, 10, multipath, mp, faulty


    -n, –raid-devices= Specify the number of active devices in the array.

Comments on "Software RAID on Linux with mdadm"

Pre-Beskæftigelse Assessment TestSuccessful salgschefer s Nike Air Max 90 Herre kal se med CV og d http://www.nyebutikdk.com ele mere bevidsthed til ansøgerens ,Nike Air Max 90 Herre?? s resultater præ-beskæftigelse vurdering test i stedet,www.nyebutikdk.com. Dette salg test bliver en standard og væsentlige praksis blandt professionelle salgsselska

I know this web site gives quality depending content and
additional material, is there any other web page which provides such information in quality?

My web page :: cialis 5 mg

The processes,bikini de marca, language and measures are normal.You don’t run a bikini de marca great IT based on a shop model, however, you delivers strategic Køb New Balance Sko business value, with information services,Køb New Balance Sko, might be IT blueprint tuned in to the needs of your business. Expense of tensions rings could

Una efecti ladies shoes wholesale va motor es útil por esto, pero en respuesta a numerosas críticas el 2007 Dakota, gafas de sol baratas este vehículo es ventajoso para la mayoría más reasons.The 2007 Dakota es considerado a alta calidad de Dodge camión 4×4 en un grado debido a la del motor; incluso estándar,ladies shoes wholesale, gastar meno

If you are goingg ffor best contents like myself, simply pay a quick visit this web page
all the time since it gives feature contents, thanks

Here is my web page – is cialis fron canada same as usa

I wanted to thank you for this excellent read!! I absolutely enjoyed every bit of
it. I have got you book-marked to look at new thingbs you
post…

Also visit mmy webpage best prices cialis 5mg

Thanks for another informative blog. Where else may I
am getting that kind of info written in such a perfect approach?
I have a challenge that I am simply now operating on, and I have been on the look out for such
information.

Here is my homepage tadalafil 20 mgcanadian on line pharmacy

Anche se,Scarpe Converse Outlet, il flusso d Scarpe Converse Outlet i agente di North Face Giacche Saldi sicurezza traininghas dimostrato la loro abilità nella produzione di agenti di sicurezza altamente qualificati, flawsare ancora lì come.Non sorprende,North Face Giacche Saldi, una volta le lezioni iniziano, quando si è studente universitario vu

Location: Home & gt; ins replica hermes birkin tant news & gt hermes kelly 35cm bag ; text text copy the link | mail recommended print used RSS single page read | comment) (Reprint: international entertainment mogulreplica hermes birkin As the God of the new world, the whole world will be completely covered by hermes birkin bags the darkne

I was able to find good information from your blog posts.

Here is my website: avoiding counterfeits when buying viagra online from canada

Howdy! Would you mind if I share your blog with my myspace group?
There’s a lot of folks that I think would really enjoy your content.

Please let me know. Cheers

Look into my weblog; lifestile pharmacy levitras

great issues altogether, you just received
a emblem new reader. What could you recommend
in regards to your submit that you made a few days
in the past? Any certain?

Also visit my website – cheap cialis canada

I enjoy, cause I found just what I was having a look for.
You’ve ended my four day lengthy hunt! God Bless you man. Have a
nice day. Bye

Here is my blog – legal online cialis

Just want to say your article is as surprising. The clearness
in your post is simply spectacular and i could assume you’re an expert on this subject.
Fine with your permission let me to grab your feed to keep updated with forthcoming post.
Thanks a million and please keep up the rewarding work.

Review my web-site Is cialis cheaper in canada

Way cool! Some very valid points! I appreciate you
writing this write-up plus the rest of the site is also very good.

Here is my web-site :: Buy cialis in usa without script

My brother suggested I might like this website. He was totally right.
This post actually made my day. You cann’t imagine just how
much time I had spent for this information! Thanks!

My page I want get drug from usa to sale

No matter if some one searches for his required thing, so he/she wishes to
be available that in detail, thus that thing is maintained over here.

Look at my webpage: Cheapdrugs.com canada

Woah! I’m really enjoying the template/theme of this site.
It’s simple, yet effective. A lot of times it’s difficult to
get that “perfect balance” between usability and appearance.
I must say you’ve done a fantastic job with
this. Also, the blog loads extremely fast for me on Chrome.
Exceptional Blog!

Also visit my web site: Apcalis-sx 20 mg

Hello, I check your blog like every week. Your humoristic style is awesome, keep it up!

Also visit my webpage are there any trusted stores to buy cialis?

Hi, I do believe this is a great website. I stumbledupon it ;) I am going to come back yet again since i have bookmarked it.
Money and freedom is the greatest way to change, may you be rich
and continue to help other people.

My web site: Brand viagra online canada pharmacy

Remarkable! Its really amazing piece of writing, I have got much clear idea about from this
paragraph.

Here is my site Canadian pharmacies generic drugs online without prescription

wonderful issues altogether, you simply gained a emblem new reader.

What might you recommend in regards to your publish that you
simply made some days in the past? Any certain?

Feel free to visit my page … where can you buy viagra for $10 a pill

Wow that was strange. I just wrote an extremely long comment but after I clicked submit my comment
didn’t appear. Grrrr… well I’m not writing all that
over again. Anyways, just wanted to say fantastic blog!

Check out my web page Buy cialis canada drugs 2015

Excellent beat ! I wish to apprentice while you amend your
web site, how can i subscribe for a weblog site?
The account helped me a appropriate deal.
I had been tiny bit familiar of this your broadcast provided bright transparent concept

Also visit my blog post … Womenviagra

I think this is one of the most important information for me.
And i’m glad reading your article. But want to remark
on some general things, The site style is perfect, the articles is really nice : D.

Good job, cheers

my blog Drugs-med.com

It’s really a nice and helpful piece of info. I’m satisfied that you
simply shared this helpful info with us. Please stay us up to date like
this. Thank you for sharing.

Review my web site :: how to get viagra without a prescription

Hello, i think that i saw you visited my weblog so i came to “return the favor”.I’m attempting to find things to improve
my web site!I suppose its ok to use a few of your ideas!!

Also visit my web blog … Lilly name brand cialis online usa

Greate post. Keep posting such kind of info on your blog.
Im really impressed by your site.
Hey there, You have done a great job. I will definitely digg it and for my part recommend to my friends.
I am sure they will be benefited from this website.

Feel free to visit my web-site :: Cheap brand cialis canada

What i don’t understood is if truth be told how
you’re now not actually much more smartly-liked than you might
be right now. You are so intelligent. You know
thus considerably when it comes to this matter, made me personally consider it from so many numerous angles.
Its like women and men are not involved except it’s one
thing to do with Girl gaga! Your personal stuffs outstanding.
All the time handle it up!

my site: Ciales on line without a precscription

Very nice post. I just stumbled upon your weblog and wanted
to say that I’ve truly enjoyed browsing your blog
posts. In any case I will be subscribing to your rss
feed and I hope you write again very soon!

my web blog :: cialis free trial coupon

Hiya! I know this is kinda off topic however , I’d figured I’d ask.
Would you be interested in exchanging links or maybe guest writing a blog article
or vice-versa? My blog covers a lot of the same topics as yours and
I think we could greatly benefit from each other.

If you are interested feel free to send me an e-mail. I look forward to hearing from you!
Excellent blog by the way!

Feel free to surf to my webpage :: Where to buy viagra in canada

Thank you for the auspicious writeup. It in fact was once a enjoyment account it.
Look complex to more added agreeable from you! By the way, how could we communicate?

Also visit my web site: is generic cialis legally available in canada

Hey! Do you know if they make any plugins to help with Search Engine
Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success.
If you know of any please share. Thank you!

Feel free to surf to my web site; clomiphene citrate tablets 100mg furtile

I’m curious to find out what blog system you’re utilizing?

I’m having some minor security problems with my
latest website and I would like to find something more
safe. Do you have any suggestions?

Visit my web site cialis en pharmacie française

I have been surfing online more than 3 hours today, yet I never found
any interesting article like yours. It’s lovely worth sufficient for me.
In my opinion, if all webmasters and bloggers made excellent content as you probably did, the internet will be much more useful than ever before.

Feel free to surf to my site :: Cecis pills

Hi, Neat post. There is a problem with your site in internet explorer, would check this?
IE nonetheless is the market chief and a huge portion of folks will pass over
your excellent writing due to this problem.

Also visit my web site: Balkanpharmaceuticals.com sold in canada

I used to be recommended this website through my cousin.
I am no longer positive whether or not this submit is written by him as no one else recognise such specific about my problem.
You are incredible! Thank you!

Here is my weblog Prescription drugs online without doctor

This blog was… how do I say it? Relevant!! Finally I’ve found something which helped me.

Appreciate it!

Have a look at my blog … Cialis 20 mg cheap canadian pharmacy

constantly i used to read smaller content that also
clear their motive, and that is also happening with this article which I am reading
here.

Feel free to surf to my web site: Northwest pharmacy – tadalafil generic best prices

What’s up it’s me, I am also visiting this site on a regular basis, this
web site is in fact pleasant and the users are
in fact sharing good thoughts.

my site – canadian generic cialis no prescription

Hi there to all, how is the whole thing, I think every one
is getting more from this site, and your views are fastidious in support of
new people.

Feel free to visit my website what is the cheapest car insurance

It’s actually very complicated in this active life
to listen news on TV, so I only use web for that reason, and take the most up-to-date information.

Visit my web page … vintage car insurance

It is perfect time to make a few plans for the long run and it is time to be happy.
I have learn this put up and if I may I want to counsel you some fascinating things or
advice. Perhaps you can write next articles relating to
this article. I wish to learn more issues about it!

Look into my web page :: get car insurance

Hello, I enjoy reading all of your article
post. I wanted to write a little comment to support you.

my page; car insurance quotes mn

Excellent pieces. Keep posting such kind of information on your blog.
Im really impressed by your site.
Hello there, You’ve done a great job. I’ll certainly digg it and in my view recommend to my friends.
I’m sure they will be benefited from this web
site.

Visit my web-site … good cheap car insurance

This is a topic that is close to my heart… Take care!
Exactly where are your contact details though?

my page … car insurance without a car

Hey there! Do you know if they make any plugins to safeguard
against hackers? I’m kinda paranoid about losing everything I’ve
worked hard on. Any recommendations?

Feel free to surf to my weblog insurance salvage cars for sale

Thank you, I have recently been searching for info approximately this
topic for a long time and yours is the greatest I’ve came upon so far.
But, what about the conclusion? Are you certain in regards to the supply?

Also visit my blog: http://www.progressive car insurance

When someone writes an post he/she maintains the image
of a user in his/her mind that how a user can be aware of it.

Therefore that’s why this paragraph is perfect.
Thanks!

My weblog … do i need rental car insurance

I’m gone to inform my little brother, that he should also go to see
this website on regular basis to take updated from most up-to-date news.

Review my web blog … business car insurance

Leave a Reply