Showing posts with label Raid. Show all posts
Showing posts with label Raid. Show all posts

Thursday, February 2, 2012

hpacucli - Check RAID Information from Linux Shell

Have you ever tried to check how the hardware RAID Array configured on server from your Linux Shell? Have you ever wanted to change or modify your Hardware RAID configurations without rebooting the server and without leaving your Linux shell?

hpacucli utility is there to help you, If your server is HP Hardware. hpacucli  (HP Array Configuration Utility CLI) is a command line based disk configuration program for Smart Array Controllers and RAID Array Controllers. You can download and  install hpacucli tool from HP website.

Quick Abbreviations:
chassisname = ch
controller = ctrl
logicaldrive = ld
physicaldrive = pd
drivewritecache = dwc

As root, just type "hpacucli" and you will be into hpacucli command line interface. Let me give you a quick example of what you can do with this hpacucli.

To Get the quick details about the RAID controller and its Health:
=> ctrl all show status

Smart Array P400 in Slot 9
   Controller Status: OK
   Cache Status: OK
   Battery Status: OK

=>
To get a quick idea of How the disks are grouped and which raid level used:

=> ctrl all show

Smart Array P400 in Slot 9           (sn: PXXXXXXXXXXXXX)

=> ctrl all show config

Smart Array P400 in Slot 9           (sn: P6YYYYYYYYYYYY)

   array A (SAS, Unused Space: 0 MB)

      logicaldrive 1 (68.3 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK)

To Get complete details about how the raid configured in the server:

=> ctrl all show config detail

Smart Array P400 in Slot 9
   Bus Interface: PCI
   Slot: 9
   Serial Number: PXXXXXXXXX
   Cache Serial Number: PAXXXXXXXXT
   RAID 6 (ADG) Status: Enabled
   Controller Status: OK
   Chassis Slot:
   Hardware Revision: Rev D
   Firmware Version: 7.08
   Rebuild Priority: Medium
   Expand Priority: Medium
   Surface Scan Delay: 15 secs
   Post Prompt Timeout: 0 secs
   Cache Board Present: True
   Cache Status: OK
   Accelerator Ratio: 25% Read / 75% Write
   Drive Write Cache: Disabled
   Total Cache Size: 512 MB
   Battery Pack Count: 1
   Battery Status: OK
   SATA NCQ Supported: True

   Array: A
      Interface Type: SAS
      Unused Space: 0 MB
      Status: OK

      Logical Drive: 1
         Size: 68.3 GB
         Fault Tolerance: RAID 1
         Heads: 255
         Sectors Per Track: 32
         Cylinders: 17562
         Stripe Size: 128 KB
         Status: OK
         Array Accelerator: Enabled
         Unique Identifier: 600508XXXXXXXXXXXXXXXX0002
         Disk Name: /dev/cciss/c0d0
         Mount Points: /boot 103 MB, swap 8.0 GB
         Logical Drive Label: A08923XXX61630G9SVI3RJCC0A
         Mirror Group 0:
            physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK)
         Mirror Group 1:
            physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK)

      physicaldrive 1I:1:1
         Port: 1I
         Box: 1
         Bay: 1
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 72 GB
         Rotational Speed: 10000
         Firmware Revision: HPDA
         Serial Number:         PXXXXXXA
         Model: HP      DG072A4951
         PHY Count: 1
         PHY Transfer Rate: Unknown
      physicaldrive 1I:1:2
         Port: 1I
         Box: 1
         Bay: 2
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 72 GB
         Rotational Speed: 10000
         Firmware Revision: HPDA
         Serial Number:         PXXXXXXA
         Model: HP      DG072A4951
         PHY Count: 1
         PHY Transfer Rate: Unknown

=>
 Be sure to verify your version of hpacucli and refer the ReadMe always, before you trying to modify the configuration of RAID or Smart Array controllers. 

Friday, August 19, 2011

lvm vs RAID1

So, what is the better approach? Using LVM mirroring capabilities or putting the LVM on a mdadm RAID 1.


lvm require extra log partition for mirroring. Altough that log partition doesn't require much space but still a extra pain.

LVM on mdadm RAID1 is more stable than LVM's own mirroring at the moment.

You don't need to partition the disk and create a new PV just for theLVM mirror log. You can use "--alloc anywhere" while creating the mirrorvolume and LVM will gladly allocate mirror log on one of your mirror legs.

Sunday, June 12, 2011

Software Raid

### Configure raid0 of 700mb and mount it on /common2
        # fdisk  -l   <<---  verify raid partition
        # fdisk /dev/sda
            create 2 raid partition (type  fd) of 350mb each  say /dev/sda11 & /dev/sda12
        # partprobe  -s
        # fdisk  -l   <<---- confirm
        # mdadm     << just check is command appearing using tab.. if no install it from yum server
        # yum   –y   install mdadm*
        # mdadm  --create  /dev/md0  --level=0  --raid-devices=2  /dev/sda11  /dev/sda12
        # mkfs.ext3   /dev/md0    ß-format  md0
        # echo “DEVICE   /dev/sda11  /dev/sda12 “  > /etc/mdadm.conf
        # mdadm   --examine   --scan  --config=/etc/mdadm.conf   > > /etc/mdadm.conf
                    OR
        # mdadm –detail –scan >> /etc/mdadm.conf
        # cat /proc/mdstat     ß verify
        # vi /etc/fstab
            /dev/md0       /common2    ext3    defaults    0   0
        # mount –a
        # mount    or   # df   -h     ß----varify  /common to be have near about 700mb mounted.
         If above question will asked for RAID1, just change a single command:
        # mdadm  --create  /dev/md0  --level=1  --raid-devices=2  /dev/sda11  /dev/sda12
        all other same as above
RAID-1:
      # fdisk /dev/sdb
            ##create 2 raid partition (type  fd) of 350mb each  say /dev/sdb8 & /dev/sdb9
      # partprobe  -s
      # fdisk  -l   <<---- confirm
      ## Create Raid -1
      # mdadm  --create  /dev/md1  --level=1  --raid-devices=2  /dev/sdb8  /dev/sdb9
      # mkfs.ext3   /dev/md1    ß-format  md1
      # mdadm   --examine   --scan  --config=/etc/mdadm.conf   > > /etc/mdadm.conf
                    OR
     # mdadm –detail –scan >> /etc/mdadm.conf
     # cat /proc/mdstat     <<- verify
     ##Mount it on /EXTRA/RAID-1
    # mount /dev/md1  /EXTRA/RAID-1
   ###Recovery -- Suppose my raid partition 8 has been crashed Or have created it for 2 diff disks and my 1  st disk has crashed
  ## So how to recover data as have craeted mirror RAID, In our case /dev/sd9 conyain mirror data
  REcovery on Raid 1:
  # umount    /dec/mb1
  # mdadm --stop  /dev/md1
  # mount  -t  ext3   /dev/sdb9   /EXTRA/TEST   <-- Have a fun :)
 # Remount the RAID
 # mdadm --assemble /dev/md1
 # mount /dev/md1 /EXTRA/RAID-1

#Simulation
# cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 sdb8[0] sdb9[1]
      200704 blocks [2/2] [UU]

md0 : active raid0 sdb7[1] sdb6[0]
      305024 blocks 64k chunks

unused devices:

## mdadm --detail /dev/md1
/dev/md1:
        Version : 00.90.03
  Creation Time : Wed Apr 13 09:58:15 2011
     Raid Level : raid1
     Array Size : 200704 (196.03 MiB 205.52 MB)
  Used Dev Size : 200704 (196.03 MiB 205.52 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Wed Apr 13 10:18:37 2011
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 44493b73:98b654f0:a313390c:1000baf6
         Events : 0.2

    Number   Major   Minor   RaidDevice State
       0       8       24        0      active sync   /dev/sdb8
       1       8       25        1      active sync   /dev/sdb9

##add the new replacement partition to the RAID. It will be resynchronized to the original partition
# mdadm --add /dev/md0 /dev/sda15
# mdadm --detail /dev/md0

Tuesday, May 17, 2011

RAID

Features:
1. The ability to increase availability and reliability of data


Tasks:
1. Create a RAID-1 Device (/dev/md0..n)
a. fdisk /dev/sdb - to create usable raw partitions
b. partprobe /dev/sdb - to force a kernel update of the partition layout of the disk: /dev/sdb
b. mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb5 /dev/sdb6
c. cat /proc/mdstat - lists active RAID (md) information
d. mke2fs -j /dev/md0 - overlays a file system on the RAID device
e. mount /dev/md0 /raid1
f. update: /etc/fstab

Note: use 'mdadm --query /dev/md0' to get information about a RAID device


Note: You may create RAID volumes/devices on a single or on multiple disks
Ideally, your RAID volumes should span multiple physical disks to improve:
a. reliability
b. performance
c. availability

2. Remove the RAID-1 device
a. umount /dev/md0
b. mdadm --manage --stop /dev/md0

3. Create a RAID-5 Volume
a. fdisk /dev/sdb - to create a partition number 7
b. partprobe /dev/sdb - to update the kernel's view of the partition table
c. mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb5 /dev/sdb6 /dev/sdb7
d. watch cat /proc/mdstat - refreshes every 2 seconds
e. Overlay a file system: mke2fs -j /dev/md0
f. mount /dev/md0 /raid5
g. Test I/O to RAID-5 device
h. Update: /etc/fstab

Monday, August 9, 2010

Software Vs Hardware RAID


A redundant array of inexpensive disks (RAID) allows high levels of storage reliability. RAID is not a backup solution. It is used to improve disk I/O (performance) and reliability of your server or workstation. A RAID can be deployed using both software and hardware. But the real question is whether you should use a hardware RAID solution or a software RAID solution.
In this post I will document my experience with both software and hardware RAID.

Comparison: Hardware vs Software RAID

FeatureSoftware RAIDHardware RAID
Cost:
Software RAID is part of OS, so no need to spend extract money.
LowHigh
Complexity:
The software RAID works on partition level and it can sometime increase complexity if you mix different partitions and hardware RAID.
Medium to highLow
Write back caching (BBU):
The software RAID cannot add a battery. Hardware RAID can run in write-back mode if it has a BBU installed. With BBU pending writes are not lost on a power failure.
NoYes
Performance:
With the software based RAID0 and RAID1 performance is negligible. However, performance goes down when you use parity-based arrays and/or several arrays at the same time. The performance of a software-based array is dependent on the server CPU performance and current load.
Depend upon usageHigh
Overheads (CPU, RAM etc): 
The software RAID must use server's CPU and RAM for RAID software. The more hard drives means more CPU cycle will go to software RAID instead of your Apache / Postfix or MySQL server.
Depend upon usageNo
Disk hot swapping:
It means replacing hard disk without shutting down the server. Many RAID controller supports disk hot swapping.
NoYes
Hot spare support:
A hard disk is physically installed in the array which stays inactive until an active drive fails, when the system automatically replaces the failed drive with the spare, rebuilding the array with the spare hard disk included.
YesYes
/boot partition:
It is hard to make fail over with software RAID if /boot fails while booting the server. This can result into unexpected errors and data loss. However, LILO and FreeBSD loader can get around this problem too.
NoYes
Open source factor:
*BSD / OpenSolaris and Linux RAID software drivers are open source. It means more people can fix problems as compare to a closed source hardware firmware. You can move, mix and match different sizes with open source software RAID.
YesNo
Vendor lock in (open formats): See above.NoYes
Higher write throughput:
Hardware RAID with BBU may offers higher write throughput.
NoYes
Faster rebuilds:
Hardware RAID with BBU may offers faster rebuilds as compare to software based solution.
NoYes
Can act as a backup solution?:
Both software and hardware RAID cannot protect you against human errors or system failures or viruses. Daily scheduled and off site backups of your system are highly recommended. Use tools such as rsync, rsnapshot, tar, dump, restore and others to make daily backups.
NoNo
Recommend usage: +Low cost solution
+Better for RAID0 or RAID1
+Single server / workstation
+Perfect for home and small business users.
+No vendor lock-ins
+Do you run a mission critical cluster or setup?
+Heavy database driven dynamic site
+Do you want the highest performance possible?

Other Factors

Powerful Modern CPU

The performance of a software-based array is dependent on the server CPU performance and load. With today's faster CPUs, software RAID outperforms hardware RAID.

Can RAID Array Fail?

Yes. The entire RAID array can fail taking down all your data (yes hardware RAID card do dies). Use tapes and other servers that can hold copies of the data, but don't allow much interaction with it. Move your data offsite. Another option is to use two or three RAID cards. Combine them together to protect your data. This make sure you gets back your data when one of your RAID card dies out.

Hardware vs Software Recovery

My personal experience - recovering from software RAID is easy. However, sometime finding out exact hardware RAID requirements can be a nightmare. A good backup can save from RAID hardware incompatibility problems. Software RAID allows you to mix different drive and sizes. You can not do something like this with hardware RAID cards. With software RAID you can swap the drives to a different server and read the data. There is no vendor lock in with software RAID solution.

You Can Not Go Wrong With Hardware RAID

There is an old saying in IT - no one ever got fired for picking RAID controllers.

Use Both Hardware and Software RAID

Sometime you need to use both hardware and software RAID to get the best of both worlds. For e.g. set up 4 mirror pairs, 2 on each hardware RAID controller, and use software RAID0 to put it all together. This will give the best performance for database server. Here is another example from one of our DR site server (this box mirrors our 30+ production server files and database):
  1. Server chassis with redundant power supplies
  2. Intel or AMD Dual Core CPU x 2
  3. 16GB ECC RAM
  4. 24 hot swappable drive bays
  5. 2 x RAID PCIe / PCIx RAID hardware controller
  6. 4 x Intel 1000 PCIx Lan cards (bond them together)
  7. 24 x 1TB SATA hard disk
  8. OS - Pick - Linux / FreeBSD / OpenSolaris
  9. Filesystem - Pick - ZFS / UFS / Ext3 (we use RAID-Z)
  10. Backup software - rsync, rsnapshots and MySQL in slave mode.
Now you can configure RAID0 stripe across the three RAID6 arrays (8 x 24 disks) using both hardware and software solution together. This massive storage system is perfect for online live backups.

Conclusion

So which one is better software raid or hardware raid?
Short answer - None.
Long answer - It depends upon your setup and requirements. I strongly recommend running both with benchmarking software to find out your disk I/O. Test both solutions by removing hard disk i.e. fail a few drives. Try running system while drives are failed. Note down system load and errors (if any). Reboot the system. See if you can boot. Can you see your data again? Are you comfortable using tools provided with both solutions? See what works for you.
Finally, while choosing a storage always consider speed, reliability, and cost - pick any two.

A Final Note About My Personal Choice

I have been successfully using Linux and FreeBSD software RAID for several years for backing up my own data. I prefer to use software RAID to save money and to avoid vendor lock ins. All my personal data backup using the following hardware:
  • 1.5 TB USB hard disk - rsync and rsnapshot is used to make backup of all my servers and digitial camera.
  • 80GB x 3 hard disk software RAID using FreeNAS. Again, rsync is used to make all backups. I'm planing to replace UFS with RAID-Z under FreeBSD 8.

RAID Alternatives

Local disks on MogileFS storage nodes can be in a RAID, or not. It's cheaper not to, as RAID doesn't buy you any safety that MogileFS doesn't already provide. This is quite popular among the web 2.0 companies where lots of photos, images and files are uploaded by their users.
RAID-Z ZFS Storage is a data/parity scheme like RAID-5, but it uses dynamic stripe width. Every block is its own RAID-Z stripe, regardless of blocksize. This means that every RAID-Z write is a full-stripe write. It doesn't require any special hardware.

References:

Tuesday, August 3, 2010

RAID 60


The diagram in Figure A gives you an idea of how a RAID 60 array is constructed. Like RAID 50, RAID 60 is a multi-level disk set; you start with a bunch of RAID 6 sets, and then these sets are aggregated at a higher level into a RAID 0 array that has no redundancy on its own. However, each RAID 60 set does have redundancy and can withstand the loss of up to two disks in each parity set. In theory, in the diagram below, you could lose six of the 12 total disks (two in each set) and still have an operational array. As soon as you lose more than two disks in a single parity set, though, your world would come crashing down, as the RAID 0 set breaks, and you’re back to data recovery mode.
Figure A
RAID 60 diagram
An additional note: RAID 60 requires a minimum of eight disks in order to operate — you need at least two four disk RAID 6 sets to comprise a single RAID 60 set.

RAID 60 benefits and drawbacks

I like RAID 50 a lot, so you might think that I’m a big believer in taking that to the next level and that I would like RAID 60 even more; to be honest, I’m not sure. I see RAID 50 as a great balance between capacity, performance, and reliability, and I see RAID 60 as potentially imbalanced on the capacity side (to the negative) in order to support the increased reliability inherent in RAID 60.
I don’t think you should simply avoid RAID 60 at all costs; instead, make the decision on a case by case basis with an understanding of the tradeoffs that you’ll face. In fact, you might find that RAID 60 is a great fit when you need higher usable capacity and better reliability and can trade a little in write performance for it.
With RAID 60, you’re going to lose anywhere from around 12% to 50% of your usable space to parity information. This is not a bad thing, and the whole design of RAID 6 is built around the idea that using more space (two disk’s worth to be exact) to enhance reliability is a good thing. If you’re ultra-concerned about reliability, are you more likely to use fewer disks per individual RAID 6 set? If so, this would decrease the overall usable capacity of the solution. In fact, in the diagram above, you’d lose 50% of your disk space to parity, so why not just go with RAID 10 in that scenario?
With RAID 6, you will take a performance hit (more so than with RAID 50) when it comes to writes, but reads will be boosted, as is the case with RAID 10 and RAID 50. The exact performance hit you take with writes under RAID 60 is largely dependent on the quality of your RAID controller and on what you’re doing. If you’re considering implementing a RAID 60 that eats 50% of your space in overhead, it’s time to consider just using RAID 10, which will provide similar read performance and better overall write performance and provide similar levels of redundancy.
From a pure reliability perspective, a RAID 60 array is orders of magnitude more reliable than even RAID 50 arrays due largely to the extra parity disk employed in RAID 60.
The more disks you add to each individual RAID 6 set in a RAID 60 array, the higher percentage of usable space you get from the overall RAID 60 array. Perhaps the biggest tradeoff in RAID 60 is that you can build larger individual RAID 60 sets in a safer manner than is possible under RAID 50, so from that perspective, perhaps you can get more safely usable space from a RAID 60 array.

Conclusion

When it comes to RAID 60, I don’t think IT pros should have a one-size-fits-all mentality. And before you jump on the RAID 60 train, be aware that there are potential downsides for usable space and performance that need to be considered, so choose wisely.

RAID 50


RAID 50 is an often overlooked RAID level that can bridge the gap when it comes to choosing between RAID 5, RAID 6, and RAID 10. Scott Lowe explains why he likes RAID 50.
———————————————————————————————————
RAID 50 is my favorite RAID level. Although RAID 50 support is not in every product (for example, my EMC AX4 at Westminster College does not support RAID 50), I find that RAID 50 provides a great balance between storage performance, storage capacity, and data integrity that’s not necessarily found in other RAID levels.
If you haven’t used RAID 50 before, you’re in for a treat. As one of the many multilevel RAID options that are out there, RAID 50 operates by striping (RAID 0) data across multiple RAID 5 sets (Figure A).
Figure A
raid50
RAID 50 diagram
As you can see in the diagram, there are three RAID 5 sets that span a total of 12 disks. Each RAID 5 set has four disks, with one disk’s worth of capacity dedicated to parity information. For the example above, this means that each RAID set will lose 25% of its total capacity to parity information, as would be the case if you were to deploy a single four-disk RAID 5 set. The beauty of RAID 50 lies in the “0″ part of the RAID level; this is where information is striped across each of those underlying individual RAID 5 sets.
There are a number of reasons why I like RAID 50, but there are also tradeoffs to using this RAID level. Here are some pros and cons about using RAID 50.

Disk space

RAID 5 requires 1/#disks worth of space per RAID array. In Figure A, this would mean that, if all 12 disks were in a single RAID 5 set, you’d be left with 11 disks worth of capacity. With RAID 50, you need to allocate one disk per underlying array for parity, so you’re left with less usable space than you would have if you simply used RAID 5.
However, if you compare RAID 50 and RAID 10, you’ll see a clear winner in RAID 50 from a capacity perspective. With RAID 10, you always lose 50% of your capacity due to mirroring. Since each underlying RAID 5 array requires a minimum of three disks (RAID 5 rules), and you lose the capacity of one disk to parity, you’ll never “lose” more than 33% of your total capacity when using RAID 5. As you make each RAID 5 set larger, this loss percentage goes down. In Figure A, with four disks used in each RAID 5 set, 25% of capacity is used for parity overhead; if you make that five disks per RAID 5 set, this percentage drops to 20%. As this percentage drops, your risk increases.
RAID 50 requires an array with at least six disks — two RAID 5 arrays of three disks each. I like to use three or four disk RAID 5 sets in RAID 50 arrays.

Risk

With RAID 5, as you increase the number of disks in the array, you increase the likelihood that you’ll experience total array failure as more than one drive fails at the same time. As you move into RAID 50 territory, that additional disk space that you’re giving up translates directly into lowered risk, as RAID 50 systems can suffer multiple disk faults — as long as those disk faults happen in the right places.
With RAID 50, if you suffer multiple disk faults in any of the underlying RAID 5 arrays, the entire RAID 50 is toast; however, each individual RAID 5 array can withstand the loss of a single disk. You never want to have more than one disk go bad at a time regardless of RAID configuration, but at least with RAID 50, your chances are much better that a second disk failure will not happen in the same array as the first failure. This is one reason that keeping the individual RAID 5 arrays small (three or four disks at most) makes a lot of sense. The more disks you add to the individual RAID 5 arrays, the higher your risk for suffering a dual disk loss in one array.
Remember, the “0″ part of RAID 50 offers no fault tolerance; all fault tolerance happens at the individual RAID 5 level. The RAID 0 part does help with performance.

Performance

RAID 50 does not perform as well as RAID 10 when it comes to performance in a degraded state (i.e., during a rebuild), but RAID 50, at least theoretically, performs much better than RAID 5 in overall write performance; this places RAID 50 between RAID 10 (the winner in performance) and RAID 5 (sometimes lackluster performance, depending on workload) in the performance spectrum. Actual performance usually depends on the choice of RAID controller and the kind of information being processed.
Like RAID 10 and RAID 5, RAID 50 provides excellent read performance.

Summary

When it comes to achieving a balance between storage cost, risk, and performance, few RAID levels go as far as RAID 50 for the following reasons:
  • Storage. Although RAID 50 uses more overhead space than RAID 5, it requires much less overhead than RAID 10, making it a nice in between choice.
  • Risk. With RAID 5 alone, organizations run the risk of a second disk failure that could compromise the entire array. RAID 50 mitigates this issue since multiple disks can fail, as long as the disks are the right ones.
  • Performance. Although overall read/write performance is highly dependent on a number of factors, RAID 50 should provide better write performance than RAID 5 alone.

Thursday, July 22, 2010

RAID




How to Implement RAID0?


How to Unconfiguring RAID0?



How to Implement RAID1?


How to Unconfiguring RAID1?


How to Implement RAID5?


How to Unconfiguring RAID5?




How to implement RAID10
?

RAID10 can be implemented by first implement RAID1(ie mirring) then implementing RAID0(stripeset on different disks) on it.


Configuring RAID10
Step1:Get the info who many devices are participating, for example here we taken 4 disks(/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1).
Step2:Implement RAID1 on four drives(taking 2 each)

#mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sd[ab]1
#mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sd[cd]1
Step3:Now implement RAID0 on two of RAID1 devices(/dev/md0,/dev/md1)

#mdadm --create /dev/md2 --chunk=64 --level=0 --raid-devices=2 /dev/md[01]
Step4:Format the RAID10 device with ext3 and mount the device
#mke2fs -j /dev/md2
#mkdir /store
#mount /dev/md2 /store
Unconfiguring RAID10
Step1:Unmount the RAID device /dev/md2
#umount /dev/md2 or #umount /store
Step2:Stop the RAID device
#mdadm --manage /dev/md2 --stop
#mdadm --manage /dev/md1 --stop
#mdadm --manage /dev/md0 --stop
Step3:Remove the Disks(/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1) by using fdisk utility


RAID01 Vs RAID10

So what is the difference between RAID01 and RAID10?
This is bit tricky question, Recently I came to know about this one in an interview. so do both are same?
No both are not same.
When we are dealing with RAID01 we are actually implementing RAID0 first then RAID1 on it. Ok little bit confused?
Let me put it in this way RAID0 is nothing but stripeset writing of data and RAID1 is Mirring of data on to disks.For example lets take 8 disks, so first we are writing whole data on 4 disks then we are mirring it on to remaining disks.
Where as in RAID10 we are first mirring disk and then striping data on mirrered disks
In general RAID01 is "a mirrior of 2 strips" and RIAD10 is "a single strip on mirrered disks"

So here one more question arises... which one is good?
RAID10 is good, the difference is that the chance of system failure with two drive failures in a RAID 0+1 system with two sets of drives is (n/2)/(n - 1) where "n" is the total number of drives in the system. The chance of system failure in a RAID 1+0 system with two drives per mirror is 1/(n - 1). So, using the 8 drive systems shown in the diagrams, the chance that loosing a second drive would bring down the RAID system is 4/7 with a RAID 0+1system and 1/7 with a RAID 1+0 system.