• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to Configure and Test RAID 0 on Linux Mint 20

  • 00:48 lsb_release -a
  • 01:00 lsblk
  • 01:10 fdisk /dev/sdb
  • 01:52 fdisk /dev/sdc
  • 02:24 mdadm -C /dev/md0 -l 0 -n 2 /dev/sdb1 /dev/sdc1
  • 03:09 mkfs.ext4 /dev/md0
  • 03:25 mdadm --detail /dev/md0
  • 03:51 mkdir raid
  • 04:00 mount /dev/md0 raid/
  • 04:19 cat /etc/mtab
  • 04:29 vim /etc/fstab
  • 04:53 df -h
  • 05:15 touch a b c
  • 05:21 mkdir aa bb cc
  • 05:30 ls -la
  • 05:39 umount raid/
  • 05:52 mdadm /dev/md0 -f /dev/sdb1
  • 06:13 vim /etc/fstab
  • 06:32 init 6
  • 06:39 cd raid/
  • 06:45 ls -la
6467

To Configure and Test RAID 0 on Linux Mint 20

Introduction:

Redundant Array of Independent Disks (RAID) is a data storage virtualization technology that connects multiple physical disk drive components into a single logical unit for the purposes of data redundancy, performance improvement. The concept of RAID 0 is the data that is split and stores in the drives. If the data from one drive is corrupted then the entire data will be lost. This tutorial will cover configure and test RAID 0 on Linux Mint 20.

Installation Procedure:

First check the version of the Linux mint 20.

root@LinuxHelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20
Release:	20
Codename:	ulyana

Now list the disk by executing the following command

root@linuxhelp:~# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   20G  0 disk 
├─sda1   8:1    0  3.7G  0 part /swap
├─sda2   8:2    0    1K  0 part 
├─sda5   8:5    0  976M  0 part /boot
└─sda6   8:6    0 15.3G  0 part /
sdb      8:16   0   20G  0 disk 
sdc      8:32   0   20G  0 disk 
sr0     11:0    1  1.9G  0 rom  /media/user/Linux Mint 20 Cinnamon 64-bit

Now create a partitions by using the following command

root@linuxhelp:~# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xc74df8b6.
Press n to create partition
Command (m for help): n
Enter the partition type
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-41943039, default 2048): 
Enter the partition size
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-41943039, default 41943039): +1G
Created a new partition 1 of type 'Linux' and of size 1 GiB.
Enter t to change the type of partiton
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): fd
Changed type of partition 'Linux' to 'Linux raid autodetect'.
Press w to write the partition
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Now follow the steps to create the another partition

root@linuxhelp:~# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x328e0fde.
Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-41943039, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-41943039, default 41943039): +1G
Created a new partition 1 of type 'Linux' and of size 1 GiB.
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): fd
Changed type of partition 'Linux' to 'Linux raid autodetect'.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Create RAID by using the following command

root@linuxhelp:~# mdadm -C /dev/md0 -l 0 -n 2 /dev/sdb1 /dev/sdc1 
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

Now format the raid in ext4 format by executing the below command

root@linuxhelp:~# mkfs.ext4 /dev/md0 
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 523264 4k blocks and 130816 inodes
Filesystem UUID: 9e759bbe-e7c7-497e-8432-e31da81a6632
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done 

Now list the raid details by enter the command

root@linuxhelp:~# mdadm --detail /dev/md0 
/dev/md0:
           Version : 1.2
     Creation Time : Tue Jan 19 15:49:23 2021
        Raid Level : raid0
        Array Size : 2093056 (2044.00 MiB 2143.29 MB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent
       Update Time : Tue Jan 19 15:49:23 2021
             State : clean 
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0
            Layout : -unknown-
        Chunk Size : 512K
Consistency Policy : none
              Name : linuxhelp:0  (local to host linuxhelp)
              UUID : 13958fbe:5f733618:4e8fc7e7:88dcbd00
            Events : 0
    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1

Now create the directory for mount the raid to the drive

root@linuxhelp:~# mkdir raid

Now mount the raid to the directory

root@linuxhelp:~# mount /dev/md0  raid/

Edit the fstab file for permanent mounting for that I am copying from the mtab

root@linuxhelp:~# cat /etc/mtab 
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
.
.
.
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=400220k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sr0 /media/user/Linux\040Mint\04020\040Cinnamon\04064-bit iso9660 ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=1000,gid=1000,dmode=500,fmode=400 0 0
/dev/md0 /root/raid ext4 rw,relatime,stripe=256 0 0
root@linuxhelp:~# vim /etc/fstab 

Add the line for permanent mounting

/dev/md0 /root/raid ext4 rw,relatime,stripe=256 0 0

Now list the drive by executing the following command

root@linuxhelp:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           391M  1.6M  390M   1% /run
/dev/sda6        16G  6.8G  7.5G  48% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda5       945M  108M  773M  13% /boot
/dev/sda1       3.7G   15M  3.4G   1% /swap
tmpfs           391M   16K  391M   1% /run/user/1000
/dev/sr0        1.9G  1.9G     0 100% /media/user/Linux Mint 20 Cinnamon 64-bit
/dev/md0        2.0G  6.0M  1.9G   1% /root/raid

Now I am enter into the raid directory and add some files on the directory

root@linuxhelp:~# cd raid/
root@linuxhelp:~/raid# touch a b c
root@linuxhelp:~/raid# mkdir aa bb cc
root@linuxhelp:~/raid# ls -la
total 36
drwxr-xr-x 6 root root  4096 Jan 19 15:53 .
drwx------ 5 root root  4096 Jan 19 15:51 ..
-rw-r--r-- 1 root root     0 Jan 19 15:53 a
drwxr-xr-x 2 root root  4096 Jan 19 15:53 aa
-rw-r--r-- 1 root root     0 Jan 19 15:53 b
drwxr-xr-x 2 root root  4096 Jan 19 15:53 bb
-rw-r--r-- 1 root root     0 Jan 19 15:53 c
drwxr-xr-x 2 root root  4096 Jan 19 15:53 cc
drwx------ 2 root root 16384 Jan 19 15:49 lost+found

Unmount the directory and test the RAID 0.

root@linuxhelp:~# umount raid/

Now I am fail the sdb1 partition

root@linuxhelp:~# mdadm /dev/md0 -f /dev/sdb1 
mdadm: set device faulty failed for /dev/sdb1:  Device or resource busy

Now command the mounting from the fstab file by executing the following command

root@linuxhelp:~# vim /etc/fstab 

Restart my distro by executing the following command

root@linuxhelp:~# init 6

After the system is restarted then I am enter into the raid directory and list the directory all the datas from the raid is corrupted

root@linuxhelp:~# cd raid/
root@linuxhelp:~/raid# ls -la
total 8
drwxr-xr-x 2 root root 4096 Jan 19 15:50 .
drwxr------ 5 root root 4096 Jan 19 15:54 . .

With this method, to configure and test RAID 0 on Linux Mint 20 is comes to an end.

Tags:
keeljohnston
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is a RAID?

A

RAID ("Redundant Array of Inexpensive Disks" or "Redundant Array of Independent Disks") is a data storage virtualization technology that
combines multiple physical disk drive components into one or more logical units for the purposes of data redundancy, performance improvement,
for more information refer to this link: https://en.wikipedia.org/wiki/RAID

Q

What is RAID 0?

A

RAID 0 (also known as a stripe set or striped volume) splits ("stripes") data evenly across two or more disks, without parity information, redundancy, or fault tolerance.
Once the stripe size is defined during the creation of a RAID 0 array, it needs to be maintained at all times.

Q

What are the benefits of using drives set up as a RAID 0?

A

A RAID 0 (disk striping) set will use the maximum amount of available storage capacity of each drive in the array, and allows for faster access and retrieval of data.

Q

How many drives are needed for a RAID 0 volume?

A

To establish a RAID 0 volume, a minimum of at least 2 hard disk drives are required. Unlike RAID 1, the number of drives used in the array can be an odd or even number.

Q

What is meant by the term "disk striping"?

A

Within a disk striping (RAID 0) volume, the information will be written evenly, or "striped", over at least 2 (if not more) disk drives.

Related Tutorials in How to Configure and Test RAID 0 on Linux Mint 20

Related Tutorials in How to Configure and Test RAID 0 on Linux Mint 20

How to install WinRAR 5.11 on Linuxmint 18.03
How to install WinRAR 5.11 on Linuxmint 18.03
May 22, 2018
How to Setup VNC Server on Linux Mint 20
How to Setup VNC Server on Linux Mint 20
Dec 22, 2020
How to install and configure samba setup in Linux mint - 18.3
How to install and configure samba setup in Linux mint - 18.3
Mar 26, 2018
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Sep 19, 2018
How to Install and Configure Samba on Linux Mint 20
How to Install and Configure Samba on Linux Mint 20
Nov 9, 2020
How to configure RAID5  in CentOS 7
How to configure RAID5  in CentOS 7
Dec 28, 2017
How to Install NextCloud on Linux Mint 18.3
How to Install NextCloud on Linux Mint 18.3
Feb 27, 2018
How To Install And Update OpenSSL On Linuxmint 18.3
How To Install And Update OpenSSL On Linuxmint 18.3
Jun 8, 2018

Related Forums in How to Configure and Test RAID 0 on Linux Mint 20

Related Forums in How to Configure and Test RAID 0 on Linux Mint 20

Linux
isaac class=
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/mysql-client-core-8.0_8.0.21-0ubuntu0.20.04.4_amd64.deb 404 Not Found
Dec 4, 2020
Linux Mint
AlxH class=
Complete beginner, install bluegriffon
Jul 1, 2020
Linux
AadrikaAnshu class=
How to add timestamps to history On Any Linux Machine
Jun 18, 2019
Linux Mint
bz0 class=
How to change a function of a key
Jun 7, 2019
Linux Mint
who class=
How to compare multiple files
Nov 10, 2019
NFS (Network File System)
Mike class=
Linux Mint 18.3 - NFS Shares - Only Root Can Mount Share
Oct 4, 2019
Command Line Tools
wayne class=
Deleting windows files booting from mint(usb)
Sep 16, 2017
Linux
jackbrookes class=
How to save or backup RAID configuration
Oct 28, 2017

Related News in How to Configure and Test RAID 0 on Linux Mint 20

Related News in How to Configure and Test RAID 0 on Linux Mint 20

A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
Apr 9, 2019
Linux Mint 18.2 Ubuntu based Operating System is named Sonya
Linux Mint 18.2 Ubuntu based Operating System is named Sonya
May 2, 2017
Refreshed Linux Mint Debian Edition (LMDE) 2 'Betsy' ISO images now available
Refreshed Linux Mint Debian Edition (LMDE) 2 'Betsy' ISO images now available
Mar 14, 2017
The Best Linux Operating System is in the house: Mint 18.2
The Best Linux Operating System is in the house: Mint 18.2
Aug 12, 2017
Linux Mint 18.1 released with smooth features and offers long-term support
Linux Mint 18.1 released with smooth features and offers long-term support
Apr 11, 2017
Linux Mint 18.2 Sonya Beta version now available for download
Linux Mint 18.2 Sonya Beta version now available for download
Jun 7, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Sebastian ?
How to change non required to required field in SuiteCRM Custom/Default Modules

How to change not required to the required field in SuiteCRM Custom/Default Modules?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.