Você está na página 1de 6

09/04/2017 Raid conguration in RHEL 6

2nd February 2012 Raid conguration in RHEL 6

Software Raid conguration in RHEL 6

Software RAID is RAID that is implemented at the software layer without the need for a
dedicated hardware RAID controller on the system. Software RAID can be created on
any storage block device independent ofstorage controllers. The Linux kernel contains a
multi-disk (MD) driver that allows the RAID solution to be completely hardware
independent. Performance of a software-based array depends on the server
CPUperformance and load. 'mdadm' utility is used in RHEL 6 for managing software
raid, which will support RAIDlevels 0, 1, 4, 5, 6, and 10

Steps for creating raid


In this document we are creating software raid with raid level 1

Step 1
Create primary partitions on each member disks of the array raid array using 'fdisk'
utility. Partition type can beset as fd ( linux raid )

[http://2.bp.blogspot.com/-
buBxeWoG5Vk/TypgPfUHSlI/AAAAAAAAAGs/TeLT4Y4mnGU/s1600/1.png]

Repeat the steps for all other members of the array /dev/sdc and /dev/sdd

Step 2
We can create raid array on the partitions using 'mdadm' utility .

http://advancelinux.blogspot.com.au/2012/02/software-raid-software-raid-is-raid.html 1/6
09/04/2017 Raid conguration in RHEL 6

[http://1.bp.blogspot.com/-
WZK50fMdyH4/TypgkrMkB2I/AAAAAAAAAG0/b6lwwK5su6Q/s1600/2.png]

If we want to change Raid level we can use -level switch with following options
raid0 / 0 / stripe
raid1 / 1 / mirror
raid4 / 4
raid5 / 5
raid6 / 6
raid10 / 10
The ---raid-devices switch lets mdadm know how many devices will make up the RAID
array. In our
example, we are using 2 devices so we specied the number 2 followed by the list of
devices. However, if we
are using more devices, make sure to reect the correct number and device list in syntax.

Step 3
To check the status of array we can use cat /proc/mdstat.

[http://1.bp.blogspot.com/-
jc_mLhusxG4/Typh78yeDCI/AAAAAAAAAG8/nJRJNWVoP3I/s1600/3.png]
mdadm -detail will give the array conguration details

http://advancelinux.blogspot.com.au/2012/02/software-raid-software-raid-is-raid.html 2/6
09/04/2017 Raid conguration in RHEL 6

[http://2.bp.blogspot.com/-CutcVhOMQow/TypiOwja_pI/AAAAAAAAAHE/ETXB3Qp-
GB4/s1600/4.png]

Step 4
After creating the raid, we should make le system on top of raid. 'mkfs' command can
be use to build le
system. mount the le system on the desired directory using mount command .

[http://3.bp.blogspot.com/-
XyGI9REfNYQ/TypihGwZDNI/AAAAAAAAAHM/2Dv3B9jlSDA/s1600/5.png]
Mount the le system using mount command

[http://2.bp.blogspot.com/-9BO1MzAypto/TypiuADoC2I/AAAAAAAAAHU/Cx7vsjmLM3A/s1
600/6.png]
http://advancelinux.blogspot.com.au/2012/02/software-raid-software-raid-is-raid.html 3/6
09/04/2017 Raid conguration in RHEL 6

Step 5
Add the new array to the /etc/mdadm.conf so that it will be automatically activated upon
reboot. The startup
scripts will reference the mdadm.conf le upon boot and start any arrays listed within
this le. If the array
is not listed in the /etc/mdadm.conf le, you will have to start the array manually.

[http://3.bp.blogspot.com/-179e_GBjnAc/Typi9mv2BWI/AAAAAAAAAHc/t27221rwfcY/s160
0/7.png]

[http://3.bp.blogspot.com/-
BAoucoJlnoA/TypjZSFFn1I/AAAAAAAAAHk/IcX3JxCgj3E/s1600/8.png]

Step 6
Update the /etc/fstab le to auto mount the RAID device upon subsequent system
reboots, with following
entries.

[http://4.bp.blogspot.com/-
mcqnI9w3GUw/TypkMFqdC_I/AAAAAAAAAHs/7KufpTu2KLg/s1600/9.png]

Step 7
Reboot the machine and conrm that le system get mounted or not. We can use 'mount'
command to list outmounted le system

[http://4.bp.blogspot.com/-
TryJF1K3pIQ/TypkYAa0OoI/AAAAAAAAAH0/dMxa8PEYGuY/s1600/10.png]

Posted 2nd February 2012 by prajeesh

http://advancelinux.blogspot.com.au/2012/02/software-raid-software-raid-is-raid.html 4/6
09/04/2017 Raid conguration in RHEL 6

6 View comments

Anonymous 20 June 2012 at 11:33


Perfect.
Reply

BigDaveF150 3 February 2013 at 10:42


Awesome write up. Much of the online documentation on mdadm is written
too much like a man page. This is actually useful. Thank you so much for
writing this!
Reply

prajeesh 22 February 2013 at 08:42


Thanks , Let me try to POST technical articles. Please share topics which you
are interested.
Reply

Anand R 18 June 2013 at 02:01


Hi sir, really nice work. it help me to know about RHEL server client
congurations... I expect lot from you... Thanks
Reply

Retrovit ID 12 May 2014 at 20:50


Thanks for review, it was excellent and very informative.
thank you :)
Reply

Venkat Nagappan 16 June 2014 at 14:00


Good articles.
Reply

http://advancelinux.blogspot.com.au/2012/02/software-raid-software-raid-is-raid.html 5/6
09/04/2017 Raid conguration in RHEL 6

Enter your comment...

Commentas: Unknown (Google) Signout


Publish Preview Notifyme

http://advancelinux.blogspot.com.au/2012/02/software-raid-software-raid-is-raid.html 6/6

Você também pode gostar