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

How To Configure RAID 6 On Linux Mint 20.2

  • 00:40 lsb_release -a
  • 00:48 lsblk
  • 01:22 fdisk /dev/sdb
  • 02:12 fdisk /dev/sdc
  • 02:38 fdisk /dev/sdd
  • 03:13 fdisk /dev/sde
  • 03:33 fdisk /dev/sdf
  • 03:53 fdisk /dev/sdg
  • 04:23 lsblk
  • 04:42 mdadm -C /dev/md0 -l 6 -n 4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
  • 05:31 mkfs.ext4 /dev/md0
  • 05:49 mdadm --detail /dev/md0
  • 06:15 mkdir details
  • 06:38 mount /dev/md0 data/
  • 06:44 df -h
  • 07:10 cd details/
  • 07:20 touch linuxhelp.txt
  • 07:36 nano linuxhelp.txt
  • 07:59 ls -la
  • 08:23 mdadm /dev/md0 -f /dev/sdb1 /dev/sde1
  • 08:58 mdadm --detail /dev/md0
  • 09:29 mdadm /dev/md0 -r /dev/sdb1 /dev/sde1
  • 10:11 mdadm /dev/md0 --add /dev/sdf1 /dev/sdg1
  • 10:39 mdadm --detail /dev/md0
  • 10:58 ls -la
  • 11:14 lsblk
6895

To Configure RAID 6 on Linux Mint 20.2

Introduction:

RAID 6, also known as double-parity RAID (redundant array of independent disks), is one of several RAID schemes that work by placing data on multiple disks and allowing input/output (I/O) operations to overlap in a balanced way, improving performance. Not all types of RAID offer redundancy, although RAID 6 does.

Installation Procedure :

Step 1 : Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20.2
Release:	20.2
Codename:	uma

Step 2 : List the Disks by using the below command

root@linuxhelp:~# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   60G  0 disk 
└─sda1   8:1    0   60G  0 part /
sdb      8:16   0    5G  0 disk 
sdc      8:32   0    4G  0 disk 
sdd      8:48   0   10G  0 disk 
sde      8:64   0   10G  0 disk 
sdf      8:80   0    6G  0 disk 
sdg      8:96   0   12G  0 disk 
sr0     11:0    1 1024M  0 rom  

Step 3 : Create partitions on those following disks

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 0x88fd26ae.

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-10485759, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-10485759, default 10485759): +2g

Created a new partition 1 of type 'Linux' and of size 2 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): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Step 4 : Follow the same method to create all the partitions by using the below command

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 0xdf7830ba.

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-8388607, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-8388607, default 8388607): +2g

Created a new partition 1 of type 'Linux' and of size 2 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): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@linuxhelp:~# fdisk /dev/sdd

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 0xf5801994.

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-20971519, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-20971519, default 20971519): +2g

Created a new partition 1 of type 'Linux' and of size 2 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): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@linuxhelp:~# fdisk /dev/sde

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 0xc304af18.

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-20971519, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-20971519, default 20971519): +2g

Created a new partition 1 of type 'Linux' and of size 2 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): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@linuxhelp:~# fdisk /dev/sdf

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 0x3daeb6da.

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-12582911, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-12582911, default 12582911): +2g

Created a new partition 1 of type 'Linux' and of size 2 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): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@linuxhelp:~# fdisk /dev/sdg

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 0x714aaee0.

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-25165823, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-25165823, default 25165823): +2g

Created a new partition 1 of type 'Linux' and of size 2 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): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Step 5 : List the disks by using the below command

root@linuxhelp:~# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   60G  0 disk 
└─sda1   8:1    0   60G  0 part /
sdb      8:16   0    5G  0 disk 
└─sdb1   8:17   0    2G  0 part 
sdc      8:32   0    4G  0 disk 
└─sdc1   8:33   0    2G  0 part 
sdd      8:48   0   10G  0 disk 
└─sdd1   8:49   0    2G  0 part 
sde      8:64   0   10G  0 disk 
└─sde1   8:65   0    2G  0 part 
sdf      8:80   0    6G  0 disk 
└─sdf1   8:81   0    2G  0 part 
sdg      8:96   0   12G  0 disk 
└─sdg1   8:97   0    2G  0 part 
sr0     11:0    1 1024M  0 rom  

Step 6 : Once created the partitions now create a RAID

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

Step 7 : Now format the raid to ext4 file by using the below command

root@linuxhelp:~# mkfs.ext4 /dev/md0
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 1047040 4k blocks and 262144 inodes
Filesystem UUID: ee03e654-6b16-4786-8687-32def08eaa5a
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

Step 8 : Check the details of RAID partition by using the below command

root@linuxhelp:~# mdadm --detail /dev/md0
/dev/md0:
           Version : 1.2
     Creation Time : Sun Jan  9 04:31:18 2022
        Raid Level : raid6
        Array Size : 4188160 (3.99 GiB 4.29 GB)
     Used Dev Size : 2094080 (2045.00 MiB 2144.34 MB)
      Raid Devices : 4
     Total Devices : 4
       Persistence : Superblock is persistent

       Update Time : Sun Jan  9 04:33:09 2022
             State : clean 
    Active Devices : 4
   Working Devices : 4
    Failed Devices : 0
     Spare Devices : 0


    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
       2       8       49        2      active sync   /dev/sdd1
       3       8       65        3      active sync   /dev/sde1

Step 9 : Create the directory in the name of details to mount by using the below command

root@linuxhelp:~# mkdir details

Step 10 : Mount the RAID in the details directory by using the below command

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

Step 11 : Now check the mounted directory by using the below command

root@linuxhelp:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           391M  1.7M  390M   1% /run
/dev/sda1        59G  8.7G   48G  16% /
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
tmpfs           391M   20K  391M   1% /run/user/1000
/dev/md0        3.9G   16M  3.7G   1% /root/details

Step 12 : To get into the details directory use the below command

root@linuxhelp:~# cd details/

Step 13 : Create the empty file inside the details directory by using the below command

root@linuxhelp:~/details# touch linuxhelp.txt

Step 14 : Now edit the following file by using the below command

root@linuxhelp:~/details# nano linuxhelp.txt 

Step 15 : List the directory by using the following command

root@linuxhelp:~/details# ls -la
total 28
drwxr-xr-x 3 root root  4096 Jan  9 04:46 .
drwx------ 6 root root  4096 Jan  9 04:44 ..
-rw-r--r-- 1 root root    23 Jan  9 04:46 linuxhelp.txt
drwx------ 2 root root 16384 Jan  9 04:33 lost+found

Step 16: To Fail the 2 disks by using the below command

root@linuxhelp:~/details# mdadm /dev/md0 -f /dev/sdc1 /dev/sde1
mdadm: set /dev/sdc1 faulty in /dev/md0
mdadm: set /dev/sde1 faulty in /dev/md0

Step 17 : Check the details of the Raid partitions by using the below command

root@linuxhelp:~/details# mdadm --detail /dev/md0
/dev/md0:
           Version : 1.2
     Creation Time : Sun Jan  9 04:31:18 2022
        Raid Level : raid6
        Array Size : 4188160 (3.99 GiB 4.29 GB)
     Used Dev Size : 2094080 (2045.00 MiB 2144.34 MB)
      Raid Devices : 4
     Total Devices : 4
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 2
     Spare Devices : 0
    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       -       0        0        1      removed
       2       8       49        2      active sync   /dev/sdd1
       -       0        0        3      removed

       1       8       33        -      faulty   /dev/sdc1
       3       8       65        -      faulty   /dev/sde1

Step 18 : Remove the failed disks by using the below command

root@linuxhelp:~/details# mdadm /dev/md0 -r /dev/sdc1 /dev/sde1
mdadm: hot removed /dev/sdc1 from /dev/md0
mdadm: hot removed /dev/sde1 from /dev/md0

step 19 : Add the new disks by using the below command

root@linuxhelp:~/details# mdadm /dev/md0 --add /dev/sdf1 /dev/sdg1
mdadm: added /dev/sdf1
mdadm: added /dev/sdg1

Step 20 : Check the details in the RAID partitions by using the below command

root@linuxhelp:~/details# mdadm --detail /dev/md0
/dev/md0:
           Version : 1.2
     Creation Time : Sun Jan  9 04:31:18 2022
        Raid Level : raid6
        Array Size : 4188160 (3.99 GiB 4.29 GB)
     Used Dev Size : 2094080 (2045.00 MiB 2144.34 MB)
      Raid Devices : 4
     Total Devices : 4
    Active Devices : 4
   Working Devices : 4
    Failed Devices : 0
     Spare Devices : 0
 Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       5       8       97        1      active sync   /dev/sdg1
       2       8       49        2      active sync   /dev/sdd1
       4       8       81        3      active sync   /dev/sdf1

Step 21 : List the Directory and check whether any data lose or file corrupted by using the below command

root@linuxhelp:~/details# ls -la
total 28
drwxr-xr-x 3 root root  4096 Jan  9 04:46 .
drwx------ 6 root root  4096 Jan  9 04:44 ..
-rw-r--r-- 1 root root    23 Jan  9 04:46 linuxhelp.txt
drwx------ 2 root root 16384 Jan  9 04:33 lost+found

Step 22 : List the partition and the RAID is working perfectly by using the below command

root@linuxhelp:~/details# lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda       8:0    0   60G  0 disk  
└─sda1    8:1    0   60G  0 part  /
sdb       8:16   0    5G  0 disk  
└─sdb1    8:17   0    2G  0 part  
  └─md0   9:0    0    4G  0 raid6 /root/details
sdc       8:32   0    4G  0 disk  
└─sdc1    8:33   0    2G  0 part  
sdd       8:48   0   10G  0 disk  
└─sdd1    8:49   0    2G  0 part  
  └─md0   9:0    0    4G  0 raid6 /root/details
sde       8:64   0   10G  0 disk  
└─sde1    8:65   0    2G  0 part  
sdf       8:80   0    6G  0 disk  
└─sdf1    8:81   0    2G  0 part  
  └─md0   9:0    0    4G  0 raid6 /root/details
sdg       8:96   0   12G  0 disk  
└─sdg1    8:97   0    2G  0 part  
  └─md0   9:0    0    4G  0 raid6 /root/details
sr0      11:0    1 1024M  0 rom   

With this, the process of Configuring RAID 6 On Linux Mint 20.2 has comes to an end…!!!

Tags:
connor
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

How to create a partition using the command?

A

To create a partition using the command fdisk /dev/sdb

Q

How do you create the RAID partitions?

A

To create a RAID partition using the command mdadm -C /dev/md0 -l 6 -n 4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

Q

How to format the RAID to ext4 file?

A

To format the RAID to ext4 file using the mkfs.ext4 /dev/md0 command.

Q

How can we fail the disk on RAID?

A

We can fail the disk on RAID by using the Command mdadm /dev/md0 -f /dev/sdc1 /dev/sde1

Q

How can we add the new disks to the RAID partitions?

A

We can add the new disks to the RAID partitions by using the mdadm /dev/md0 --add /dev/sdf1 /dev/sdg1 command.

Related Tutorials in How To Configure RAID 6 On Linux Mint 20.2

Related Tutorials in How To Configure RAID 6 On Linux Mint 20.2

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 RAID 6 On Linux Mint 20.2

Related Forums in How To Configure RAID 6 On Linux Mint 20.2

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 RAID 6 On Linux Mint 20.2

Related News in How To Configure RAID 6 On Linux Mint 20.2

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 Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

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.