Tuesday, March 31, 2015

what are the different types of raid levels in linux.


RAID Levels

 total 10 types of RAID levels:

  • RAID level 0
  • RAID level RAID level 1
  • RAID level 2
  • RAID level 3
  • RAID level 4
  • RAID level 5
  • RAID level 6
  • RAID level 10
  • RAID level 50
  • RAID level 0+1

Following  RAID levels are commonly used :

RAID 0: (block-level striping without parityor mirroring)

RAID-0 stores the data evenly into multiple disks,

Fault tolerance is not available, so does not provide data redundancy, if just one disk is crashes the data will be lost.

“Read and Write” speed is fast. So it provides great performance of data access.

  • Maximum of 32 Hard Disks
RAID 0

RAID 1: (mirroring without parity or striping)

RAID-1 stores the date simultaneously into two different disks.

It provides great security for your data with fault tolerance, if one disk is destroyed, a copy of its contents is located on another disk.

Read speed is fast and Writes speed is slow so it provides good performance of data access.

  • Minimum & Maximum 2 Hard Disks
RAID 1


RAID 5: (block-level striping with distributed parity)

Data stores alternately and evenly to all disks and parity also writes in all drives along with data.

Fault Tolerance is available; Array is not destroyed by a single drive failure.

RAID 5
W ith RAID 5 can only survive the loss of a single disk; no more than one hard disk can fail at the same time. If one is destroyed, it must be replaced as soon as possible to save the data.

  • Minimum of 3 Hard Disks
  • Maximum of 32 Hard Disks
  • Read & Write Speed is Fast
RAID 6 (block-level striping with double distributed parity)
It provides fault tolerance up to two failed drives. This makes larger RAID groups more practical, especially for high-availability systems.
RAID 6
T his becomes increasingly important as large-capacity drives lengthen the time needed to recover from the failure of a single drive. Like RAID 5, a single drive failure results in reduced performance of the entire array until the failed drive has been replaced and the associated data rebuilt.





what is meant by raid levels.

(Redundant Array of Independent Disks)


RAID is a storage technology that combines multiple disk drives into a logical unit.
It efficiently stores and retrieves the data across multiple hard drives using raid techniques such as striping, mirroring and parity.

Main advantage of RAID, It provides great redundancy, performance, increased bandwidth, and protects the data against hard drive crashes.

Hardware Raid:
Hardware Raid which comes along with a specific hardware disk array called Raid hardware controller. It can be configure on BIOS level of the system.

Raid array adapters/controllers plug into a host bus slot [typically a 133 MB/sec PCI bus]. Arrays are available for mid- to high-end servers due to cost.
Lower-cost bus-based array adapters are now available for entry-level servers.

External Hardware RAID Card Intelligent external array controllers "bridge" between one or more server I/O interfaces and single-or multiple-device channels.

Software Raid:
Here operating system acts as Software Raid controller; it can be implementing OS Kernel level.
The performance of a software-raid depends on the server CPU performance and load.

Striping: Disk striping is the process of dividing data into blocks and spreading the data blocks across several hard disks. which can be as small as one sector (512 bytes) or as large as several megabytes.

Parity: Parity is a combination of data storing in foam of images. The parity drive points to data drives. But if loss parity drives we can’t access the data drives.







logical volume manager in linux.

 LVM is mechanism to manage storage systems in a scalable manner.

It allocates disk devices into pools of storage space called Volume Groups, these volume groups are turn subdivided into Logical Volumes.


Follow 3 steps process to create LVMs.
  • Set of hard drives combined into one/more Physical volumes.

  • Those Physical volumes combined into Volume Groups.

  • Then creating Logical Volumes from Volume Groups Space.


Benefits of Logical Volume Management
  • We can easily resize of existing partitions.

  • Create a logical volume and file-system which spans multiple disks.

  • Implement LVM with RAID, it provides fault tolerance with scalability and easy disk management.


* Boot loader can’t read Logical Volumes, so we can’t create /boot partition with LVMs




package managers in linux.

 Red-Hat distribution has 2 package managers:

RPM - Red-Hat Package Manager: RPM is a powerful software configuration manager, used for Installing, removing, verifying and updating software packages.
With RPM Tool we can’t install depended of the packages automatically. We have to do it manually.

YUM - Yellow Doc Update Modifier: Yum is a package manager from RHEL5 onwards; it is also use for Installing, removing verifying and updating software packages.


YUM Tool automatically installs depending packages from YUM repository.

different types of backup in linux.

Backup: Backup is a method for save and recover the data when needed.

External Backup: DUMP

Local Backup: CPIO (copy in copy out)

Remote /Network Backup: SCP (secure copy), RSYNS (remote synchronization)

Dump: It provides a great facility to take the backup and restore of Ext2 and Ext3 file system, with Full and Incremental backup methods.

It allows 0-9 levels to take backups and restores, with these levels we can do backup /recovery and identity of Full / Incremental backups.

Full Backup: It takes backup of entire file system on hard-drive/ volumes.
We can take full backup in first time with “0” level.

Incremental Backup: It is next level Backup to take the modified, newly created files after Full Backup; we can take these backups up to 1 to 9 levels.


scheduling jobs in linux (cron and at)


To run some programs automatically at a specified time in the future will use scheduling tasks in Linux.

  • Taking backups in middle of night.
  • Installing the packages, updates the patches, etc.

There are 2 tools available in Linux: AT Jobs & CRON Jobs

AT: It allows performing particular job at particular time, but not repentantly.
To Run the At jobs To Monitoring the At jobs :

#at 17:30 atq

#at 12:00 tomorrow at -l
#at 5pm + 1 day / tomorrow at –c <Job No>
#at 11am jul 31 atrm <Job No>


CRONTAB :It allows performing the schedule tasks repentantly in future., So we can schedule Jobs “Minute, Hours, Day, Month and Year wise.

To Run the Cron Jobs: crontab –e

To List the Cron Jobs: crontab –l

To Run the Cron Jobs with specific User: contab –u <username>

Syntax of Crontab :

Minutes    Hours      Date of Month   Month of Year         Day of Week
0 to 59    0 to 23   1 to 31               1 to 12                      0 to 6


Ever Two Minutes Particular Hour Particular day of month Particular Month of year
*/2 12 11 08 <JOB>
Random Minutes Random Hours Random days of month Random Months
1,30,45 08,10,22 1,15,30 01,10,12 <JOB>