RAID5 AND ITS CONFIGURATION

Raid 5 is a type of raid that uses both disk stripping with parity. It requires three disks so if one crashes,  it takes data from remaining two disks.It is basically used to increase the performance and reliability of data storage.

r5

Now how to configure it:

  •    Create three partitions
[root@localhost ~]# fdisk /dev/sdb
The number of cylinders for this disk is set to 1634.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (1-1634, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1634, default 1634): +800M
Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (99-1634, default 99):
Using default value 99
Last cylinder or +size or +sizeM or +sizeK (99-1634, default 1634): +800M
Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (197-1634, default 197):
Using default value 197
Last cylinder or +size or +sizeM or +sizeK (197-1634, default 1634): +800M
Command (m for help): p
Disk /dev/sdb: 13.4 GB, 13445111808 bytes
255 heads, 63 sectors/track, 1634 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb4               1        1634    13125073+   5  Extended
/dev/sdb5               1          98      787122   83  Linux
/dev/sdb6              99         196      787153+  83  Linux
/dev/sdb7             197         294      787153+  83  Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

  •   Change its type to raid linux. To change its type follow these steps:
[root@localhost ~]# fdisk /dev/sdb
The number of cylinders for this disk is set to 1634.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)


Command (m for help): t
Partition number (1-7): 5
Hex code (type L to list codes): fd
Changed system type of partition 5 to fd (Linux raid autodetect)


Command (m for help): t
Partition number (1-7): 6
Hex code (type L to list codes): fd
Changed system type of partition 6 to fd (Linux raid autodetect)


Command (m for help): t
Partition number (1-7): 7
Hex code (type L to list codes): fd
Changed system type of partition 7 to fd (Linux raid autodetect)


Command (m for help): p
Disk /dev/sdb: 13.4 GB, 13445111808 bytes
255 heads, 63 sectors/track, 1634 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb4               1        1634    13125073+   5  Extended
/dev/sdb5               1          98      787122   fd  Linux raid autodetect
/dev/sdb6              99         196      787153+  fd  Linux raid autodetect
/dev/sdb7             197         294      787153+  fd  Linux raid autodetect


Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# partprobe /dev/sdb
  • After making partition raid type we are are going to create Raid5
[root@localhost ~]# mdadm --create /dev/md5 --level=5 --raid-devices=3 /dev/sdb5 /dev/sdb6 /dev/sdb7

mdadm: array /dev/md5 started.

In this entry, – -level means what type of raid we want it to be ,– –raid-devices means how many devices you want  to connect.

  • Your raid 5 is ready  you can can check it by typing
 [root@localhost ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md5 : active raid5 sdb7[2] sdb6[1] sdb5[0]
      1574016 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
md6 : active raid6 sda8[3] sda7[2] sda6[1] sda5[0]
      995712 blocks level 6, 64k chunk, algorithm 2 [4/4] [UUUU]
unused devices:


RAID6 AND ITS COFIGURTION

RAID1 AND ITS CONFIGURATION

DIFFERENCE BETWEEN RAID01 AND RAID10

Raid0 AND ITS CONFIGURATION

4 thoughts on “RAID5 AND ITS CONFIGURATION

  1. You have made some good points there. I checked on the internet for
    additional information about the issue and found most people will go along with your views on this website.

    Like

  2. I’m not that much of a internet reader in truth but your website is
    very nice, thanks! I’ll go ahead and bookmark your website to come back later.
    Good luck.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s