Announcement

Collapse
No announcement yet.

How To Set Up Software RAID 0 for Windows and Linux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How To Set Up Software RAID 0 for Windows and Linux

    Up your speed by linking two or more drives in RAID 0

    For serious PC builders, speed is the name of the game. Too often, storage becomes a bottleneck that holds back even the beefiest CPU. Even with the advent of SSDs, leveraging a redundant array of independent disks (RAID) can drastically reduce boot and loading times. RAID 0 is the easiest way to get more speed out of two or more drives, and lets you use a pretty cool acronym to boot.
    In our test rig, we used a pair of Samsung 840EVOs with the latest firmware.
    RAID has several “levels” that use drives in different ways. Level 0 (RAID 0) spreads or “stripes” data between two or more drives. The problem with striping data across drives is that when things go wrong, they go really wrong: If a single hard drive in a RAID 0 array fails and cannot be recovered, the entire RAID array is lost.
    On the plus side, RAID 0 combines the drives into a single larger logical drive with a capacity that is the sum of all the drives in the array. We found in our test rig that write cache stacked as well, which resulted in faster writing for large files. The data stored on the drives are read or written simultaneously, resulting in greatly reduced access times.
    There are three ways to implement RAID: hardware, software, and FakeRAID. Hardware RAID is faster, but it’s also more expensive due to the need for specialized hardware. Software and FakeRAID use the CPU in lieu of a dedicated RAID chip.
    Creating a software RAID array in operating system software is the easiest way to go. Windows 8 comes with everything you need to use software RAID, while the Linux package “mdadm” is listed in most standard repositories.
    The problem with software RAID is that it only exists in the OS it was created in. Linux can’t see a RAID array created in Windows and vice versa. If you’re dual booting both Linux and Windows and need access to the array from both operating systems, use FakeRAID. Otherwise, stick to software.
    Prepare your hardware

    To ensure the best RAID performance, use identical drives with the same firmware. Mixing drive makes and models may work, but will result in faster drives being slowed down to match the slowest drive in the array. Don’t mix SSDs and mechanical drives in a RAID array; the SSD is faster on its own.
    RAID 0 doesn’t protect you from drive failure, so use new drives whenever possible. When connecting your drives, make sure they’re all using the same SATA version as well.
    Before a drive can be used in a RAID array, it must be clear of filesystems and partitions. If you’re using old drives, make sure you get everything of value off of them first. You can remove any partitions with Disk Management on Windows or “gparted” on Linux. If you’re using FakeRAID, the motherboard’s RAID utility should warn you before it wipes partition tables and the filesystems on them.
    In your operating system, you’ll need to have elevated permissions to create a RAID array. For Windows, you’ll need to be an Administrator. In Linux, you’ll need either the root password or sudo access.
    If you want to use FakeRAID, make sure your motherboard supports it. Be warned though: Installing an OS on top of a RAID 0 array can be really risky if your system data is critical.
    Windows: storage spaces

    Creating a software RAID 0 array on Windows is really easy, and relatively painless. The thing is, Microsoft doesn’t call it RAID in Windows 8, opting for “storage spaces” and “storage pools” instead.
    Hit Win+S and search for “storage spaces” and open the utility. Next, click Create a new pool and storage space. You’ll be prompted for administrator access. Click Yes to continue.
    Windows 8's built-in RAID software goes by the name "Storage Spaces."
    You’ll be greeted by a windows showing all the unformatted disks that can be used. Select all the disks you want in the array and click Create pool.
    To create a storage pool in Windows 8, the disks need to be unformatted.
    Next, give the pool a name and drive letter. The name will appear as the drive label. Select NTFS as the filesystem. For Resiliency type, select Simple (no resiliency). This is the equivalent to RAID0. When you’re ready, click Create storage space to create the array.
    While a simple storage space technically only requires one hard disk, you need at least two for it to be a true RAID setup.
    If you want to remove a RAID array for any reason, simply click Delete next to the storage space you want to remove. To remove the pool, remove all of the storage spaces in it first.
    When you're all done, you'll be able to manage your storage spaces, check capacity, and monitor usage.
    See? Told you it was easy. Next up, we're going to cover creating RAID 0 arrays in Linux and in FakeRAID.


    Linux: Excuse me, mdadm

    Creating a software RAID in Linux is faster than Windows because it only requires a couple of console commands. In our example, we booted from a live Ubuntu 14.04 LTS USB stick.
    First, you need to download and install mdadm from your package manager. In Ubuntu, use aptitude to install the program:
    sudo apt-get install mdadm
    Once mdadm is installed, you can create your array by typing the following command as root or using sudo:
    mdadm --create /dev/mdX --level=0 --raid-devices=[number of drives] [drive name] [drive name] [etc]
    The above command will vary based on the size of your array, and how you’d like to name it. RAID devices are generally named /dev/mdX where X is the index of the array. Drive names must be valid Linux device paths, e.g., /dev/sda or /dev/disk/by-uuid/[UUID]. In our example, we used the following:
    mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb
    To take apart the RAID array, use the following commands:
    umount -l /dev/mdX
    mdadm --stop /dev/mdX
    sudo mdadm --zero-superblock /dev/sdX
    sudo mdadm --zero-superblock /dev/sdY …

    Using onboard FakeRAID

    Onboard FakeRAID is harder to set up, but is your only real choice if you want your RAID array to be accessible to both Windows and Linux. It also offers the advantage of letting you install Windows 8 on top of it. Linux can the installed on a FakeRAID array as well, but requires use of the dmraid driver.
    Once your drives are physically installed, boot into your BIOS by tapping the key prompted on startup. The message will say “Press DEL to enter Setup…” or something similar.
    Once you’re in your BIOS, look for an option called “SATA mode.” This option is in different places for each motherboard manufacturer, so refer to your user manual if you can’t find it. Once you’ve found the setting, change the setting to RAID. This will let your onboard RAID software know that there are possible RAID devices to be started. When you’re done, save and reboot.
    On the next boot, you have to get into the RAID software to set up your arrays. If you have Intel RAID onboard, you should be prompted to hit CTRL+I to start the Intel Rapid Storage Technology (RST) RAID software. Software varies by vendor, so consult your motherboard manual on entering the RAID utility.
    In the RST menu, you should see some options and a list of hard drives on your system. Select Create RAID Volume.

    Any disks attached via SATA in RAID mode will show up in Intel RST. Disks that aren't included in an array will be shown as a "Non-Raid Disk."
    On the next screen, give the RAID array a name and hit Enter. In the next field, use the up and down arrow keys to select the RAID level labeled RAID 0 (Stripe) and hit Enter again.
    In the next field, you can set the size of the striped data, but the default size should work just fine. Hit Enter to save the strip size and capacity to their default values and hit Enter again to create the volume. Confirm that you’re OK with wiping everything off the disks in your array by typing “Y.”
    Creating a RAID volume in Intel's RST software is pretty straightforward.
    Back on the home screen, you will see a RAID volume, with the status of the disks used in the array changed from “Non-RAID disk” to “Member Disk.” Use the down arrow to select Exit to save and exit the software.
    When you return to RST's main screen, you'll see that the drives will have been added as members to the RAID array. You can also remove disks from the array or delete the array altogether.
    On the next boot, your FakeRAID array will appear as a single volume to the operating system. Additionally, RST will display the status of your RAID disks during the boot process, before the operating system loads. From there, you can partition and format the RAID array as you would any other disk.
    Setting up RAID 0 is a little more work than just slapping in some hard drives and booting up, but the speed benefits are undeniable.


    More...
    ClanofIdiots.com Administrator
    PcGamingNetworks.com Co-owner
    webmaster@clanofidiots.com
Working...
X