Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering Ubuntu Server

You're reading from   Mastering Ubuntu Server Master the art of deploying, configuring, managing, and troubleshooting Ubuntu Server 18.04

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781788997560
Length 552 pages
Edition 2nd Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Jay LaCroix Jay LaCroix
Author Profile Icon Jay LaCroix
Jay LaCroix
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

Title Page
Dedication
Packt Upsell
Contributors
Preface
1. Deploying Ubuntu Server FREE CHAPTER 2. Managing Users 3. Managing Storage Volumes 4. Connecting to Networks 5. Managing Software Packages 6. Controlling and Monitoring Processes 7. Setting Up Network Services 8. Sharing and Transferring Files 9. Managing Databases 10. Serving Web Content 11. Learning Advanced Shell Techniques 12. Virtualization 13. Running Containers 14. Automating Server Configuration with Ansible 15. Securing Your Server 16. Troubleshooting Ubuntu Servers 17. Preventing and Recovering from Disasters 1. Using the Alternate Installer 2. Assessments 3. Other Books You May Enjoy Index

Setting up software RAID


Part of the benefit of the alternate installer is that it allows us to install Ubuntu in ways that aren't normally available with the live installer. One of the additional features is to be able to install Ubuntu on software RAID, which is what we will do in this section. Here, the steps that we'll go through actually continue on from step 14 in the previous section. Follow these steps to set up an installation with software RAID, specifically with RAID1 between two disks in this case.

  1. In the previous section, we chose Guided - use entire disk at the screen shown in the following screenshot. To set up RAID, we'll select Manual on this screen instead:

Choosing the option to manually partition our system

  1. Next, we'll select the first disk and press Enter:

Selecting our first disk

  1. Next, you'll be asked whether you will want to create a new partition table on this disk, which will wipe all data on it. Choose Yes and press Enter:

Confirming the initialization of the first disk

  1. On the next screen, select the second disk (the one we haven't initialized yet) and press Enter:

Selecting the second disk

  1. You'll again be asked whether you wish to create a new partition table. Select Yes and press Enter:

Confirming the creation of a new partition table on the second disk

  1. On the next screen, we'll choose the Configure software RAID option:

Choosing the software RAID option

  1. Before we can continue, the installer must finalize the changes we've made so far (which at this point has only been to initialize the disks). Select Yes and press Enter:

Finalizing disk initialization

  1. Next, choose Create MD device and press Enter:

Getting ready to create a new MD device

  1. Next, we'll select the type of RAID we wish to work with. Select RAID1 and press Enter to continue:

Selecting the type of RAID we will use

  1. Next, choose the number of disks we will add to RAID1. RAID1 requires exactly two disks. Enter 2 here and press Enter:

Choosing the number of disks we will use

  1. If we have additional drives beyond two, we can add one or more hot spares here. These will be used in the event of a failure with one of the RAID disks. If you have an extra disk, feel free to use it and enter the appropriate number here. Either way, select Continue and press Enter:

Choosing how many hot spares to initialize

  1. Next, we will choose which disks to include with our RAID1 configuration. We should have exactly two listed. Use the arrow keys to move between them, and press Space to select a disk. We need to select both disks, which means we will be marking both with an asterisk (*). Once you've selected both disks, select Continue and press Enter:

Choosing the disks to use with the RAID configuration

  1. Next, we'll finalize our selections so far. Select Yes and press Enter:

Finalize RAID changes

  1. Select Finish to continue on:

Selecting Finish to finish setting up RAID

  1. Now, we have successfully set up RAID. However, that alone isn't enough; we need to also format it and give it a mount point. Use the arrow keys to select the RAID device we just set up and press Enter:

Selecting our new RAID device so we can configure it

  1. Using the following screenshot as a guide, make sure you set Use as to EXT4 journaling file system (you can choose another filesystem type if you wish to experiment). In addition, set the Mount point to / and then select Done setting up the partition:

Reviewing configuration settings for our RAID device

  1. To finalize our selection, choose Finish partitioning and write changes to disk:

Finishing partitioning

  1. Next, we'll see one last confirmation before our new partition will be created. Select Yes and press Enter:

Final confirmation for this portion of the installation routine

That pretty much covers the process of setting up RAID. From here, you can return to the previous section and continue on with the installation process with step 16. Once you finish the entire installation process, it will be useful to know how to check the health of the RAID. Once you log in to your new installation, execute the following command:

cat /proc/mdstat

Checking the health of the RAID device

In the previous screenshot, you can see that we're using RAID1 (look for the section of the output that reads active raid1). We an also see whether each disk in the RAID array is online, looking for the appropriate number of Us. It's this line: 20953088 blocks super 1.2 [2/2] [UU]

If the output included U_ or _U instead of UU, we would have cause for alarm, because that would mean one of the disks encountered an issue or is offline. Basically, each U represents a disk, and each underscore represents where a disk should be. If one is missing and changed to an underscore, we have a problem with our RAID array.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images