Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Creating Software RAID-1 in Debian/Ubuntu

Rumi, May 26, 2013May 26, 2013
Below are the steps on how to configure the Software RAID:
 
1) Select the Manual for the Partitioning Method:
 
1
 
2) On this screen, it will show you the available hard disk for the installation. Make sure both hard disks are visible. Now select the first hard disk and hit Enter:
2
 
3) A message will warns you that you are about to create a new partition that will destroy any existing partition. Choose Yes to proceed:
3
 
4) You will noticed that it will create a new partition at the bottom of the hard disk. Choose the new partition and hit Enter:
4
 
5) Select the Create New Partition:
5
 
6) Since we are creating the partition for boot, just type 100 MB in the line:
6
 
7) Choose the Primary partition:

 
8 ) Choose to create new partition at the Beginning of the space:

 
9) On this screen, move you selector to Use As and hit Enter:

 
10) Please choose the Physical Volume For RAID option:
null
 
11) Please make sure that the Bootable Flag is tuned On:
null
 
12) Choose the Done Setting Up The Partition to save the new partition:
null
 
13) You will be taken back to the first screen. Next is to choose the next free space and hit Enter:
null
 
14) Select the Create A New Partition:
null
 
15) Now we are adding the new partition for the Swap. Please take note that always make sure that the Swap size is double the amount than your physical RAM. Since my physical RAM was only 384MB, so my swap size should be set as 768 MB in the box:
null
 
16) Select the Primary option:
null
 
17) Select the Beginning option:
null
 
18 ) On the next screen, move your selector to the Use As and hit Enter:

 
19) Select the Physical Volume For RAID option:

 
20) After that, just straight away select the Done Setting Up The Partition to complete:

 
21) Back to the original screen, select the another free partition again and hit Enter:

 
22) Select the Create A New Partition option:

 
23) Now we are creating the partition for root. So just use all the leftover hard disk space:

 
24) Select the Primary option:

 
25) Move the selector to Use As and hit Enter:

 
26) Select the Physical Volume For RAID and hit Enter:

 
27) After that, just straight away choose the Done Setting Up The Partition:

 
28 ) Now moving on to the second hard disk for the partitioning. Hit Enter and please follow the Step 3 – 27 to do the same partitioning with the 2nd hard disk:

 
29) After the 2nd hard disk has been partitioned, the overall partition configuration will look exactly like the bottom. Each space in each partition will reflect to each other in the 2nd hard disk. So now move the selector to Configure Software RAID and hit Enter:

 
30) Select Yes to accept the new partition changes:

 
31) Now we will group the RAID hard disk. Select the Create MD Device option:

 
32) Choose your preferred RAID method. For now, we are going to choose RAID1:

 
33) Just leave the default number 2 for the number of RAID devices. This option may varies depending on which RAID type you selected:

 
34) Just leave it zero if you don’t put up any spare hard disk for your RAID:

 
35) Now select the SDA1 and SDB1 as we are creating the RAID for /boot:

 
36) When it has been done, choose the Finish to save the new RAID partition:

 
37) Now we are proceeding with the 2nd RAID partition. Choose the Configure Software RAID and hit Enter:

 
38 ) Select Yes to proceed with the RAID configuration:

 
39) Choose the Create MD Device option:

 
40) Choose the RAID1 option:

 
41) Just leave the default value of 2 RAID active devices and proceed:

 
42) Leave the default value of zero for the RAID spare array unless you know what you are doing:

 
43) Now select the SDA2 and SDB2 for the Swap partition purposes:

 
44) Select the Finish to complete the setting for the Swap partition:

 
45) Now we proceed with the /root partition setup. Choose the Configure Software RAID and hit Enter:

 
46) Select Yes to proceed with the RAID partition setup:

 
47) Choose the Create MD Device option:

 
48) Choose the RAID1 setup:

 
49) Just leave the default value of 2 for the active RAID devices:

 
50) Leave the default value of zero for the spare RAID devices:

 
51) Now select the remaining partition for /root space which are SDA3 and SDB3:

 
52) Soon after, just choose the Finish to complete the setup:

 
53) Now the initial software RAID is completed like the below picture, what’s left is to assign each RAID partition its role. Now select the RAID partition Device #0 for /boot setup:

 
54) Choose the Use As and hit Enter:

 
55) Choose the EXT3 Journaling File System (or EXT4 for Ubuntu) and hit Enter:

 
56) Now move the selector to the Mount Point and hit Enter:

 
57) Now select the /boot and hit Enter:

 
58) Select the Done Setting Up The Partition to complete the /boot partition setup:

 
59) At the first screen again, now select the RAID Device #1 and hit Enter:

 
60) Move the selector to the Use As and hit Enter:

 
61) This time we are going to create a Swap partition for the operating system. So select the Swap Area and hit Enter:

 
62) Just straight away select the Done Setting Up The Partition soon done:

 
63) Now is to edit the last partition of the RAID which is meant for /root. Select the RAID Device #2 and hit Enter:

 
64) Move the selector to the Use As and hit Enter:

 
65) Select the EXT3 Journaling File System and hit Enter:

 
66) Now move the selector to the Mount Point and hit Enter:

 
67) Select the / – The Root File System and hit the Enter:

 
68) Finally select the Done Setting Up the Partition to complete the procedure:

 
69) The final outlook of the partition should be like below. Once confirmed, move the selector to the most bottom of the screen to select the Finish Partitioning And Write Changes To Disk and hit enter:

 
70) Just press Yes if you confirmed the partitions:

 
71) Then just follow the normal installation procedure. Once the server has been rebooted, log in as root and type cat /proc/mdstat to view the RAID status:

 
72) By default, the GRUB boot loader only were installed in one of the hard disk only. If you forgot this step, your second hard disk can’t boot by itself. You need to copy the GRUB from the SDA to SDB. Just type grub and follow like below, line by line:
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
device (hd1) /dev/sdb
root (hd1,0)
setup (hd1) 

 
73) For Ubuntu users version 9.10 and above, the system will install the boot loader in both partition during setup as long as you enabled the Boot from Degraded Disk option.
74) Please take note that the software RAID will be running under MDADM. This is a software that being developed to handle the RAID procedure inside the server. You can type mdadm –help for further information
The server’s software RAID should be running fine now. Happy trying ;)
 
The entire doc is also available in PDF format- Debain-Raid
Administrations Configurations (Linux) DebianRAID

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes