You are on page 1of 28

Software RAID on Linux

Presented by:

Niladri Saha Amit Kumar Saha


College Roll No. 04/CSE/17 College Roll No. 04/CSE/20
Univ. Roll No. 10301041016 Univ. Roll No. 10301041022

Supervised by:

Mr. Soumen Paul, Lecturer


Department of CS & I
Haldia Institute of Technology
Haldia
1 Software RAID on Linux- Presentation
Agenda

 Software RAID
 Why RAID?
 RAID setup
 RAID Operations
 Software RAID Tool
 Ending notes..

2 Software RAID on Linux- Presentation


Software RAID

 Software RAID is RAID implemented with


software - no additional hardware such as a
RAID controller is needed
 Software RAID is a good starting point to
start getting some hands-on RAID experience
 A software layer sits above the (generally
block-based) disk device drivers and provides
an abstraction layer between the logical drives
(RAID arrays) and physical drives
3 Software RAID on Linux- Presentation
Why RAID?

 RAID stands for Redundant Arrays of


Inexpensive Disks
 The basic idea of RAID is to combine multiple
small, independent disk drives into an array of disk
drives which yields performance exceeding that of
a Single Large Expensive Drive (SLED)

4 Software RAID on Linux- Presentation


RAID Setup on Linux

 Preferably a Linux kernel from the 2.4 series or later


 Tools for manipulating RAID, such as 'raidtools' and
'mdadm'

5 Software RAID on Linux- Presentation


Creating a usable RAID array

 Creating the RAID array


 $ sudo mdadm --create --verbose /dev/md5 --level=5 --raid-
devices=3 /dev/sda8 /dev/sda9 /dev/sda10
 Creating the filesystem
 $ sudo mke2fs /dev/md5
 Mounting the RAID array
 $ sudo mount /dev/md5 /media/RAID5

6 Software RAID on Linux- Presentation


RAID performance tests

 We conducted some basic tests to measure the


performance of a RAID– 5 array with respect to a
single disk device w.r.t the following parameters:
 CPU usage
 time taken

7 Software RAID on Linux- Presentation


RAID performance tests

8 Software RAID on Linux- Presentation


RAID
Operations

9 Software RAID on Linux- Presentation


Querying the RAID array status

 MDADM can be used to-


 -Q, --query: Examine a device to see:
 if it is an md device, and
 if it is a component of an md array.
 -D, --detail: Print detail of one or more md devices.

10 Software RAID on Linux- Presentation


Monitoring RAID arrays

 mdadm is used to monitor a RAID array in simple


and effective way.
 The following line shows how we can set it up:
 $ mdadm --monitor --delay=1800 /dev/md5
 There are two ways to specify the e-mail address (for
sending notifications):
 Specify it using the –mail switch, or
 Specify it the mdadm.conf file

11 Software RAID on Linux- Presentation


Simulating a drive failure

 Simulating a drive failure allows you to test the


behavior of your RAID array when it fails- such as a
disk failure
 Simulation can be done in two ways:
 Force fail by hardware
 Force fail by software. For eg:
 $sudo mdadm --set-faulty /dev/md5 /dev/sda10, will set the device
/dev/sda10 faulty

12 Software RAID on Linux- Presentation


Software RAID
Tool

13 Software RAID on Linux- Presentation


Software RAID Tool

 Working with a RAID is possible only by using


command line tools such as ’mdadm’
 We have completed a working software tool which
wraps the major functionalities of ’mdadm’ in an easy
GUI

14 Software RAID on Linux- Presentation


15 Software RAID on Linux- Presentation
16 Software RAID on Linux- Presentation
17 Software RAID on Linux- Presentation
18 Software RAID on Linux- Presentation
19 Software RAID on Linux- Presentation
Features

 The Software RAID Tool currently has support for:


 Creating a RAID device
 Managing existing RAID devices
 Conduct some Input/Output tests on RAID devices
 Emulate Failures on RAID
 Obtain existing RAID statistics
 Help sets on Software RAID

20 Software RAID on Linux- Presentation


Implementation Details

Java Technologies
+
Native Linux utilities

21 Software RAID on Linux- Presentation


Implementation Details

 Integrated Development Environment (IDE)


 NetBeans 6.1 Beta IDE was used for the development of
the software tool.
 Java Technologies
 Swing Application Framework
 JavaHelp
 Java API for XML Processing (JAXP)
 eXtensible Markup Language (XML)

22 Software RAID on Linux- Presentation


Implementation Details

 Native Linux utilities


 mdadm
 BASH scripting
 time
 dd

23 Software RAID on Linux- Presentation


Calling the native utilities/scripts
from Java

String cmdline = "/bin/sh raid-devs.sh";


try {
Process md_devs = Runtime.getRuntime().exec(cmdline);
..
}catch(Exception e){
System.out.println(e);
}

24 Software RAID on Linux- Presentation


Future improvements

 Currently, the tool supports only the basic RAID


operations
 The integration of the tool with the native utilities is
loose

25 Software RAID on Linux- Presentation


Ending Notes

 Theoretical aspects of software RAID and also


have experimented with the various aspects of
RAID- creation and management
 Designed a tool for working with software RAID
which enables the user to avoid using the
command line for simple tasks
 Used as a teaching aid in a software RAID course

26 Software RAID on Linux- Presentation


References

 Patterson, D. , Gibson, G. , Katz, Randy H. ,“A Case for


Redundant Arrays of Inexpensive Disks (RAID)”
 Saha, A.K., “Hands-on Linux Software RAID”,
http://linuxgazette.net/150/saha.html
 http://en.wikipedia.org/wiki/RAID
 “The Software RAID How-To”,
http://tldp.org/HOWTO/Software-RAID- HOWTO.html
 https://appframework.dev.java.net/
 http://java.sun.com/products/javahelp/

27 Software RAID on Linux- Presentation


Thank You!

28 Software RAID on Linux- Presentation

You might also like