guide to raid 0

Discussion in 'Hardware' started by blackstar, Aug 13, 2003.

Share This Page

  1. blackstar

    blackstar Regular Kustomer

    Joined:
    Jul 25, 2003
    Messages:
    327
    Likes Received:
    0
    I hope this may answer some questions.
    Remember, always back up before RAID’ing or attempting any changes to your drives. Setting up RAID will erase any data on your drives!

    So, what is RAID 0 + requirements

    How does RAID 0 work?

    What is “stripe size”, and how can it affect the speed of my RAID 0 array?

    How do I find out what to set the “stripe size” value to? *added - stripe size calculator program*

    How can I experiment with stripe sizes, without reinstalling my O/ S?

    References, and useful links

    Thanks



    So, what is RAID 0?
    There are many levels of RAID available. The one we’re interested in is RAID 0.
    RAID 0 is a method of improving the rate at which we can read/ write data from hard disks.

    Firstly - creating RAID will erase any data on the drives, so backup first!

    RAID can be setup in Windows (software RAID) or, using a RAID controller (hardware RAID).

    Hardware RAID - requires a RAID controller, either onboard or on a RAID card and often, a copy of the RAID drivers on floppy disk.

    Software RAID does not require a RAID controller – howto: http://www6.tomshardware.com/howto/20010906/raid-02.html

    Both kinds of RAID require more then one Hard drive, ideally identical size + type.

    When a hardware RAID 0 “array” is constructed, your operating system will view both hard drives (or more) as one, large drive – which will be faster at reading/ writing files between certain sizes (find out why some file sizes run faster then others later).
    This is good for speed. But, as there is always a chance that any hard drive can fail, by joining two together, you are marginally increasing the risk of losing data.
    However, even though the risk is low, it’s a good idea to get hold of a copy of Norton Ghost or another good drive imaging program – to take a “snapshot” of your drives contents, to restore later in case of any problems. And, there's another advantage to using a drive imaging program - see the final section :)
    Most RAID controllers are accessible in DOS - there’s been a few Q's about this. Dos treats the drive as normal - you can FDISK, FORMAT whatever, just like a normal drive.

    To install Win2000/ XP on hardware RAID, you will often need a copy of the RAID driver on floppy disk.
    Check with your motherboard or RAID card manufacturer, or other users of the same type.


    How does RAID 0 work?
    When you use a RAID controller, you can access more then one hard drives at once (lets say 2, for example - but it depends on the controller)
    By splitting your data across two or more disks, which can be read to and written to simultaneously, the data rate can be increased – it doesn’t double for two disks, but there is a noticeable improvement if you set it up correctly.
    Read performance gets the most gain; write does too, but not to such a large degree.
    The gain you get is because the drives are accessed differently to normal.
    In RAID 0, the disks are formatted into many stripes of a fixed size – stripe 1 on disk 1, stripe 2 on disk 2, stripe 3 on disk 1, and so on.
    The bigger the file you are reading/ writing, the more stripes it covers across both disks. And, this increases speed – while one drive is reading from a stripe, the other is getting in position to read its stripe and so on. “Prefetch” is a good word for this.

    [ur]http://images.anandtech.com/reviews/storage/RAID/RAID0.gif[/url]

    [linked to ANANDTECH, original picture from PROMISE TECHNOLOGY]


    What is “stripe size”, and how can it affect the speed of my RAID 0 array?
    The drives are “striped” – “stripes” of a certain size are created on both disks, and the size of each stripe is measured in kilobytes – “stripe size”. The speed our RAID array will access files will be different depending on the stripe size, and the size of the file being accessed.

    If you have 32KB stripes, and you are writing a 64KB file, the file is split over the two drives - 32KB each. As one drive is accessing its 32KB stripe, the other is seeking the start of its stripe, so it’s ready to read as soon as the first drive has finished. You can read and write the file faster.

    However, it depends on how big the files on your hard drive are on average - if the stripe size is bigger then your file, like below:

    E.g. say it’s a 32KB stripe, and a 16KB file

    The file is small enough to only be written to one stripe, on one drive. This means it can only be accessed at the speed of one drive, not two or more.
    Another problem with stripes in general is that each stripe holds at maximum one file – and any extra space in the stripe that isn’t full, gets wasted.
    (112KB for every 16KB written to a 128KB stripe, 128-16=112)
    (Wastage gets worse if you have huge stripes, and lots of small files)

    If the stripe size is smaller then the file, you do gain speed – like the first example “If you have 32KB stripes, and you are writing a 64KB file”…

    But if the stripe size is too small, you lose speed due to excessive drive seeking, and CPU overhead rises.

    Not very straightforward, is it? But, never mind – the differences in speed aren’t huge. And, it’s pretty easy to find a good stripe size to start with, and experiment with it.
    And, the final section details how to experiment with stripe size, without reinstalling your operating system – if you have a good drive-imaging program like Ghost.


    How do I find out what to set the “stripe size” value to?
    Depends on how big the files you move around most are, and your hardware (in particular, seek time of your hard drive and CPU power)

    You may want to accelerate video editing - in this case, go for the largest stripe available, e.g. 128KB.

    To accelerate very small file access, use a small stripe size, e.g. 16KB.

    To accelerate your operating system and for general use, I suggest 64K or 32KB.

    Otherwise, you want stripes 1/2 the size of the most common files I suppose, theoretically anyway…
    A way to find the average file size is to use disk defragmenter’s analyse function, and half the “average file size”.
    Stripe size starts at 1KB(!) and goes up in doubles, (1, 2, 4, 8, 16, 32, 64, 128, 256 options) for most controllers.
    Go for the next size down for stripe size.

    This app will calculate the stripe size exactly as mentioned
    stripeSizeCalculator.exe

    Going for the next size down, not up, helps make sure as much data as possible is striped (and not just written to one drive) – see “What is “stripe size”

    My analysis in disk defrag gives an average file size of 228 - half of 228 = 124, so I chose the next size down – 64K as a start point.
    However, this method is not 100% accurate to give you an answer – but, it does give you a good start point (if your average file size is 256K, there’s no point in using 16K for a major boost) - it only takes a few big files to "skew" the results. I think use the average file size as a guide, and try the two or three stripe sizes AROUND THE MOST LIKELY. I tried 32, then 64, and maybe later 128, experimentation guided by the average file size
    Experimenting is best - it also depends on your hard drives (seek times in particular), and the controller used.
    So, either experiment, or look for test results from someone with as close a system to yours as possible - drive controller/ drive.
    As a rough guide, 1/2 the average file size.


    How can I experiment with stripe sizes, without reinstalling my O/ S?
    Install windows onto your RAID drive, and then use Norton Ghost or a known good drive imaging program to make an image file, or "snapshot" of your drive's contents.
    Then change the stripe size - Ghost should be able to restore the image back to your drives, whatever the stripe size is set to (after all, the image isn’t dependant on stripe size).
    Recommended - latest version of Ghost.

    If you don’t know what size to use, use the default one and use Ghost as above to experiment with different sizes.

    Note - I found a bug in Ghost, after selecting "backup" in Windows, it reboots into DOS mode to make the backup and freezes on my system.

    When/ if it freezes
    , reset and boot into DOS with a startup disk, and run "autoexec" from the DOS prompt. This loads Ghost, and backs up :)


    References, and useful links:
    http://www.anandtech.com/storage/showdoc.html?i=1491&p=2

    http://www.storagereview.com/guide2000/ref/hdd/perf/raid/concepts/genArrays.html

    http://data-recovery.lsoft.net/concept_raid.html

    http://www.short-media.com/request.php?103 >> ATTO disk benchmark
     
  2. Blue Raptor

    Blue Raptor Regular Kustomer

    Joined:
    Apr 4, 2003
    Messages:
    288
    Likes Received:
    0
    that needs to be stickyed very very useful great job :)
     
  3. blackstar

    blackstar Regular Kustomer

    Joined:
    Jul 25, 2003
    Messages:
    327
    Likes Received:
    0
    thx :D
    even if its useful to one person, thats great :cool:
     
  4. Blue Raptor

    Blue Raptor Regular Kustomer

    Joined:
    Apr 4, 2003
    Messages:
    288
    Likes Received:
    0
    realy it is very good I learned a lot did know about the stripe wastage
     
  5. blackstar

    blackstar Regular Kustomer

    Joined:
    Jul 25, 2003
    Messages:
    327
    Likes Received:
    0
    good stuff!
    btw, any abit NF7 users experiencing any SATA corruption should do two things:

    1) install latest BIOS.
    this fixes most cases afaik.

    2) set RAID setting from 30 us to 1ms. this fixed corruption probs for me :D
     
  6. Fat Jez

    Fat Jez Master of the High Five!

    Joined:
    Apr 15, 2003
    Messages:
    4,405
    Likes Received:
    0
    One thing, RAID 0 does not have to use only 2 disks, it's just most controllers on PC motherboards only have 2 channels.

    Cheers,
    Stephen (who had 4 days of RAID drummed into him on the Sun StorEdge Volume Management course - Veritas Volume Management by another name)
     
  7. blackstar

    blackstar Regular Kustomer

    Joined:
    Jul 25, 2003
    Messages:
    327
    Likes Received:
    0
    yep jez, it requires @ least two disks :)
    (it is in the post, btw :D )

    what did they teach you about RAID that took 4 days? blimey.
     
  8. Fat Jez

    Fat Jez Master of the High Five!

    Joined:
    Apr 15, 2003
    Messages:
    4,405
    Likes Received:
    0
    Sorry, should have read it more closely.


    How to set up and manage RAID arrays on Sun systems basically. We covered RAID0,1,5, as well as how to build a RAID array from the ground up and methods of backing it up.

    Cheers,
    Stephen
     
  9. blackstar

    blackstar Regular Kustomer

    Joined:
    Jul 25, 2003
    Messages:
    327
    Likes Received:
    0
    sun systems - cool! used to repair the Darwin SUN workstations. amazing tech they have there.. the SUN @ portsmouth/ plymouth? my g/f's uncle works there - gerald finch.
    :)
     
  10. Fat Jez

    Fat Jez Master of the High Five!

    Joined:
    Apr 15, 2003
    Messages:
    4,405
    Likes Received:
    0
    I work for Orange in Bristol, we just use a lot of Sun kit. In our case, we use Veritas Volume Management with RAID 1 (mirrors)arrays for resiliency.

    I've done my Sun training at Sun's training centre in Camberley, and also at their training centre at Strathclyde Uni (my old university). I have one more course on Solaris 9 Network Admin (London training centre) and that will be my lot for the year.

    Cheers,
    Stephen
     
  11. abe

    abe Super Kustomer

    Joined:
    Jun 8, 2001
    Messages:
    1,936
    Likes Received:
    0
    Good information, even im using it :)

    Thanks, and in return its stickied :cool:
     
  12. blackstar

    blackstar Regular Kustomer

    Joined:
    Jul 25, 2003
    Messages:
    327
    Likes Received:
    0
    wow! thanks Abe :)
     
  13. Hutchy

    Hutchy *\\(^o^)//*

    Joined:
    May 10, 2002
    Messages:
    389
    Likes Received:
    0
    right , i have a 80gig maxtor 8mb cache and one 80gig 2mb cache.

    Can i raid these ?

    If yes do i have to format both hdds and start again to raid 0 ??
     
  14. Kynoch

    Kynoch Locked and Loaded

    Joined:
    Apr 8, 2002
    Messages:
    5,566
    Likes Received:
    0
    Ideally its better to have two identical drives, im not sure if it will work or not, but i knwo that you will have to format and start from scrath on the drives.
     
  15. bmorgan98

    bmorgan98 Kustomer

    Joined:
    Oct 22, 2002
    Messages:
    86
    Likes Received:
    0
    HELP RAID PROBLEM

    my spec:

    msi kt6 fisr motherboard
    connect3d radeon 9800xt
    1gb crucial ddr400 ram
    2 x maxtor dmax 9 80gb SATA drives
    VIA vt8237 southbridge SATA RAID controller (raid 0/1)

    my problem is when i try to run a raid 0 array, the windows xp installation (along with the raid drivers on floppy) fails to install and gives the error screen "UNMOUNTABLE_BOOT_VOLUME". This only happens on raid 0, raid 1 and non raid work fine.

    any ideas?

    THX
     
  16. blackstar

    blackstar Regular Kustomer

    Joined:
    Jul 25, 2003
    Messages:
    327
    Likes Received:
    0
    sorry didnt get back to you earlier..

    k, do you have the latest bios version?

    what stripe size did you use?

    *i have built a stripe size calculator if anyone can host :) *
     
  17. abe

    abe Super Kustomer

    Joined:
    Jun 8, 2001
    Messages:
    1,936
    Likes Received:
    0
    Blackstar if you need anything hosted email it to me and i'll do that for you.
     
  18. Deton8or

    Deton8or Kustom Monkeh!

    Joined:
    Jan 2, 2004
    Messages:
    81
    Likes Received:
    0
    I have two raid sockets on my motherboard. does this mean i can raid 2 sets of 2 drives? or just two drives? or maybe some other combination.

    I thought about using raid for dvd rips which will be 700MB ish, so what do u think the best settings would be?

    :) cheers i am noobish

    p.s. obviously i'll buy 2 identical drives, or 4 if i do :)
     
  19. blackstar

    blackstar Regular Kustomer

    Joined:
    Jul 25, 2003
    Messages:
    327
    Likes Received:
    0
    what mobo is it? :)

    if youre moving around big files, go for the biggest stripe size.

    thanks for hosting offer Abe.. i've been away for a while, didnt get the notification sorry :eek: all set now :)
     
  20. Deton8or

    Deton8or Kustom Monkeh!

    Joined:
    Jan 2, 2004
    Messages:
    81
    Likes Received:
    0
    Gigabyte GA-7VAXP Ultra like it says in spec below! :)