1

I have a system with the following components:

  • RAM -> 32GB (swap filed is advisable to be DOUBLE the RAM size so 64/65GB)
  • sda -> Samsung 500GB SSD -> Raid disc 1 -> RAID-1 member 0 === soft raid
  • sdb -> Samsung 500GB SSD -> Raid disc 2 -> RAID-1 member 1 === soft raid
  • sdc -> WD 1TB HDD
  • sdd -> Seagate 2TB HDD

Goal:

Install Linux distro + apache web + php + mySQL (+ future mail server) onto system. Have system available for web-hosting -> for web-development portfolio.

What I've tried already:

As mentioned above I have 2 x 500GB SSD's. SO why not run them in RAID-1. I don't have to, but their available so why not? ok, so its software raid, but if 1 drives fails, at least there's 1 another copy available.

When I first tried install Debian 9.5, I originally set the sda - 500gb SSD, and sdb - 500gb SSD, as RAID 0, in the BIOS. Debian DID NOT SEE the drives. Back into BIOS remove RAID, re-start Debian Install -> NOW SEE's DRIVES. I got up and running on my local host. However, after a reboot, I couldn't get into the system any more (password fail). Since nothing on it, I chose to re-install.

This time, I tried the Ubuntu server ISO. And here's where all the questions come from: In the ubuntu install sequence. It wanted me to start doing disc partitioning. So it wants me allocate /boot, /home, /, ... I did the following:

  • gave it 1GB for /boot, but I was NOT able to put it on the RAID.
  • In the documentation it said you normally want DOUBLE your RAM for swap file size. I have 32GB so double is 64GB. Which I partitioned on both drives in RAID. So I ended up with RAID 1 - 0 -> 64GB (swap file) and the Raid 0 - 1 (435GB) balance for OS/Server, apps.

The question:

How do I put the /boot partition on the RAID-1?

7
  • 1
    Hello. Please edit your question to describe your available disk sizes. You've mentioned 65GB swao (ouch) - just how much memory does this box have? And you've also mentioned 1TB and 2TB drives. Are you using hardware RAID or software? Commented Nov 2, 2018 at 0:30
  • Welcome to Unix & Linux! ;-) Could you edit your question and ask... erm.. well... one question... per question? Then ping me here @Fabby so I can come back and answer your question. Now your question is too broad
    – Fabby
    Commented Nov 2, 2018 at 7:43
  • @Fabby more details up above - question edited - hopefully it provides clarity Commented Nov 2, 2018 at 9:03
  • Please re-read if I understand your issue correctly (Edited) then ping me again.
    – Fabby
    Commented Nov 2, 2018 at 9:46
  • @Fabby how do I put /boot partition on Raid-1 - yes, and how do I install a swap file 64GB on Raid-1, and how do I install everything else on the balance of Raid-1, Consider: 500GB available. 1GB - /boot, 64GB - /swap, 435GB -/everything else but all 3 on the SAME Raid-1 Commented Nov 2, 2018 at 9:52

1 Answer 1

1

RAID-0 stripes your data across multiple drives and is worse than no RAID at all from a reliability perspective because if one drive fails, the entire array becomes inaccessible and that's why Ubuntu refuses to mount boot on a RAID-0 array.

RAID-1 protects your drives by mirroring 2 drives and writing to both at once (slower than no RAID) and reading from both at once (faster).

As the hardware RAID of your RAID Controller does not seem to be recognised by Ubuntu (Probably because it's a BIOS Fake RAID), your only other option is to use a software RAID and this has some disadvantages:

  • No Dual boot with another OS (as the software RAID is OS specific)
  • All of the RAID processing is done by the system’s CPU instead of the Hardware RAID Controller
  • Disk replacement when the RAID fails needs an of-line backup of the configuration data.
  • Needs a backup and a restore of the UEFI partition that came with the machine as you're going to wipe both drives.

As you're installing a server ISO, RAID-1 use the following process:

  1. Backup the EFI partition using something like CloneZilla Live just in case you want to go back.
  2. Boot the Server ISO until you get to "Partitioning the disk"
  3. Choose Manual for your partitioning method: Manual Pärtitioning
  4. Select the first hard drive, and agree to "Create a new empty partition table on this device?".
  5. Repeat this step for the next drive that will be part of the RAID array.
  6. Select the Free Space on the first drive then select Create a new partition.
  7. Select the size of the partition. This partition will be the swap partition, (have a look here for swap size) then choose Primary, then Beginning.
  8. Select the Use as line at the top. By default this is Ext4 journaling file system, change that to physical volume for RAID then Done setting up partition.
  9. For the /boot partition once again select Free Space on the first drive then Create a new partition.
  10. Use at least 2 GB of the free space on the drive and choose Continue, then Primary.
  11. As with the swap partition, select the Use as: line at the top, changing it to physical volume for RAID. Also select the "Bootable flag:" line to change the value to "on". Then choose Done setting up partition.
  12. For the / partition once again select Free Space on the first drive then Create a new partition.
  13. Use all of the free space on the drive that's left and choose Continue, then Primary.
  14. Select the Use as: line at the top, changing it to physical volume for RAID. Then choose Done setting up partition<.

and then follow normal formatting to format the partitions.

And finally when the system is fully running, backup the mdadm config!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .