[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedFebruary 23, 2023

How to create RAID 0 (disk striping)

How To Create RAID 0 (Disk Striping)

RAID 0 (disk striping) is the process of dividing a body of data into blocks and spreading the data blocks across multiple storage devices, such as hard disks or solid-state drives (SSD), in a redundant array of independent disks (RAID) group.

 

About RAID-0 

RAID-0 is usually referred to as “striping.” This means that data in a RAID-0 region is evenly distributed and interleaved on all the child objects. For example, when writing 16 KB of data to a RAID-0 region with three child objects and a chunk-size of 4 KB, the data would be written as follows:

4 KB to object 0
4 KB to object 1
4 KB to object 2
4 KB to object 0

  • Requirements

The minimum number of disks is allowed to create RAID 0 is 2, but you can add more disk but the order should be twice as 2, 4, 6, 8. If you have a Physical RAID card with enough ports, you can add more disks.

To create RAID 0 follow the nest steps:

  • Update the system and install “mdadm” package:

    The mdadm is a small program, which will allow us to configure and manage RAID devices in Linux.

    Creating partitions for RAID

Now create 2 partitions for raid, with the help of following commands.

#fdisk /dev/sd

  1. Press ‘n‘ for creating a new partition.

  2. Then choose ‘P‘ for Primary partition.

  3. Next, select the partition number as 4.

  4. Give the default value by just pressing two times Enter key.

  5. Next press ‘P‘ to print the defined partition.

Please follow the same above instructions to create a partition on sd*(2) drive.

After creating partitions, verify both the drivers are correctly defined for RAID using the following commands.

#mdadm –examine /dev/sd[*-*]

#mdadm –examine /dev/sd[*-*]1

 

Creating RAID md devices 

Now since we have all the partitions with us, we will create RAID 0 array on those partitions, with the help of following commands.

# mdadm -Cv -l0 -c64 -n2 /dev/md0 /dev/sd{*,*}1

    -C, –create (Create a new array.)

    -v, –verbose (Be  more  verbose about what is happening.)

    -l, –level=  (Set RAID level.)

    -c, –chunk= (Specify chunk size of kilobytes.)

    -n, –raid-devices= (Specify  the number of active devices in the array.)

Now since our raid 0 array is created successfully. Verify the changes using below command

# cat /proc/mdstat

 

Create file-system and mount point

Raid 0 array is ready, we will create a filesystem on top of /dev/md0 so it can be used for storing data.

#mkfs.xfs /dev/md0

Once xfs filesystem has been created for Raid device, now create a mount point directory and mount the device /dev/md0 under it.

# mkdir /raid0
# mount /dev/md0 /raid0/
Next, verify that the device /dev/md0 is mounted under /raid0 directory.

#df -hTOnce

You’ve verified mount points, it’s time to create an fstab entry in /etc/fstab file.

# vim /etc/fstab

Add the following entry as described. May vary according to your mount location and filesystem you using.

/dev/md0                /raid0              xfs    defaults         0 0

Run mount ‘-a’ to check if there is any error in fstab entry.

# mount -a

Keep reading
How to create a VM with VirtualBox.
July 18, 2023

How to create a VM with VirtualBox.

How To Create A VM With VirtualBox. A virtual machine (VM) is a software emulation of a physical computer system. It allows you to run an operating system (OS) and execute programs as if you were using a dedicated physical machine. How to create a Vm? Start VirtualBox on your computer. Click on…

Read article
How to manage the Network Bridge for KVM.
July 14, 2023

How to manage the Network Bridge for KVM.

How To Manage The Network Bridge For KVM This guide shows you how to manage the Network Bridge for KVM in Virtualizor.Virtualizor will create a viifbr0 bridge.viifbr0 assumes eth0 as the Network Device and detects the IP, Netmask, GATEWAY from : /etc/sysconfig/network-scripts/ifcfg-eth0 or…

Read article
Create RAID 5 software during OS install
July 14, 2023

Create RAID 5 software during OS install

How to create raid 5 software during OS install. RAID 5 is a combination of three or more hard disks that function as a single logical drive and thereby outperform individual data carriers in terms of reliability and read speed. But to offer these advantages, a RAID 5 system relies on two active…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00