I tried to build a SATA software RAID configuration that boots the OS on Ubuntu Server

background

On a bare metal server, I personally verified the setting memo that boots the OS with software RAID1 (mirror) configuration with two storages. I see information on RHEL and CentOS, but I would like to try it in the Ubuntu environment and make it versatile information in the Linux environment. It's easy to install a hardware RAID card, but it's not cheap, so let's easily make it redundant with software RAID with SATA.

Operating environment

If you search the net for this kind of information, there are many pages that I tried with Virtualbox, but please understand that it can not be said unconditionally whether it actually works with the bare metal server of the actual machine because the operation of the BIOS differs depending on the manufacturer and model. Please. For reference only. This time, we verified with the actual used rack mount server of FUJITSU's PRIMERGY series, which is often found in your home rack.

-FUJITSU Server PRIMERGY

BIOS settings

First, set the BIOS of the actual bare metal server. Use the [F2] or [DEL] keys to display the BIOS screen. IMG_4025 (2).jpg IMG_4027 (2).jpg Here, set the SATA mode in the BIOS settings to [AHCI Mode] instead of [RAID Mode]. This [RAID Mode] is a software RAID setting that requires driver software for Windows OS, which is also called Fake RAID. This kind of FakeRAID cannot be used in principle because the driver software is insufficient on Linux. There may be RHEL driver software in some cases.

Ubuntu Server installation

When installing the software RAID environment of ubuntu, be sure to use the "Alternative Ubuntu Server installer" version because the installation cannot be done well with the "Desktop" version or the normal "Server (Live)" version.

This time, I used "Ubuntu Server 18.04.3 LTS".

Language setting

If you select Japanese, it will stop in the middle, so install it in English. IMG_4029.jpg However, there was no problem with the keyboard and regional settings even in Japanese.

Storage partition

This time, we will create two partitions for the entire single storage. One is for OS booting and the other is for OS and users. Since it is configured as RAID1 (mirror) with 2 units "/ dev / sda" and "/ dev / sdb", there are a total of 4 partitions. IMG_4030 (2).jpg That partition builds an Ext4 file format on a partition with RAID attributes. LVM will not be used this time.

Create partition for OS boot

Create a partition for OS boot at the beginning of storage. A size of 1GB is enough. Create "/ dev / sda1" and "/ dev / sdb1" in each of the two storages. Set the partition to the RAID attribute. Also, be sure to enable (on) the OS bootable flag :. IMG_4031 (2).jpg IMG_4032.jpg The Ext4 file format is not set here as it is after RAID is configured. Don't make a mistake.

Create OS and user partitions

Create "/ dev / sda2" and "/ dev / sdb2" for the remaining free space of the storage for the OS and users, respectively. Also, set the partition to the RAID attribute. IMG_4033.jpg The Ext4 file format is not set here as it is after RAID is configured. Don't make a mistake.

Create RAID configuration device MD

RAID configuration storage is recognized as an MD device. Create an MD device by combining the RAID attribute partitions created in the two storages.

--Create a "md0" RAID device by combining the first created RAID attribute partitions "/ dev / sda1" and "/ dev / sdb1" with a capacity of 1GB for booting the OS. IMG_4035 (2).jpg

--Combine the remaining "/ dev / sda2" and "/ dev / sdb2" to create a "md1" RAID device IMG_4037 (2).jpg

If the screen display contents do not change after creation, it will be displayed by returning one screen and re-recognizing it.

Ext4 file format settings

Create an Ext4 file format partition on the created RAID MD device.

--Set the mount position of "md0" for OS boot to "/ boot" IMG_4040 (2).jpg

--Set the mount position of "md1" for OS and user to "/" IMG_4042.jpg

Final confirmation of partition creation

Make sure that the software RAID configuration for your storage is as expected and then partition the installation. In particular, make sure that you have not forgotten the OS boot flag of the RAID partition for OS boot. I think that the installation is completed successfully until the end and you can restart.

OS boot confirmation

After rebooting, the RAID synchronization settings are in progress, so let's check.

$ cat /proc/mdstat

After RAID synchronization is complete, let's check if the OS boots for each storage alone.

reference

Work memo for HDD replacement due to RAID storage failure on CentOS

Recommended Posts

I tried to build a SATA software RAID configuration that boots the OS on Ubuntu Server
I tried to create a server environment that runs on Windows 10
When I tried to build a Rails environment on WSL2 (Ubuntu 20.04LTS), I stumbled and fell.
I tried to register a station on the IoT platform "Rimotte"
[Python] I tried to make a simple program that works on the command line using argparse.
I tried to draw a system configuration diagram with Diagrams on Docker
I tried to build a super-resolution method / ESPCN
I tried to build a super-resolution method / SRCNN ①
I tried to build a super-resolution method / SRCNN ③
I tried to build a super-resolution method / SRCNN ②
I tried to make a translation BOT that works on Discord using googletrans
[LPIC 101] I tried to summarize the command options that are easy to make a mistake
I tried to build an environment with WSL + Ubuntu + VS Code in a Windows environment
[Go + Gin] I tried to build a Docker environment
Memo A beginner tried to build a Java environment and Japaneseize it on Ubuntu 18.04.2 LTS.
I tried to notify the honeypot report on LINE
I tried to draw a configuration diagram using Diagrams
[Shell startup] I tried to display the shell on the TV with a cheap Linux board G-cluster
I tried to summarize the languages that beginners should learn from now on by purpose
I tried to build a service that sells machine-learned data at explosive speed with Docker
How to build a new python virtual environment on Ubuntu
I tried changing the python script from 2.7.11 to 3.6.0 on windows10
I tried to launch ipython cluster to the minimum on AWS
I tried to output the access log to the server using Node.js
I tried to make a script that traces the tweets of a specific user on Twitter and saves the posted image at once
[Flask] I tried to summarize the "docker-compose configuration" that can be created quickly for web applications
I tried to make a site that makes it easy to see the update information of Azure
I tried to expand the database so that it can be used with PES analysis software
A story that didn't work when I tried to log in with the Python requests module
I tried to make a system that fetches only deleted tweets
A note on how to check the connection to the license server port
I tried to build the SD boot image of LicheePi Nano
[Python] A memo that I tried to get started with asyncio
I just wrote a script to build Android on another machine
I tried to digitize the stamp stamped on paper using OpenCV
I tried to get started with Bitcoin Systre on the weekend
I tried to cut out a still image from the video
I tried to make a serial communication single function module that controls the servo motor on the Petit Robo board in C language
Using PyAutoGui, I tried to automate the UI test of a VB6 program running on Windows Server 2003 R2 (input command cheat sheet).
I tried to push the Sphinx document to BitBucket and it will be automatically reflected on the web server
I tried Cython on Ubuntu on VirtualBox
I tried to move the ball
I tried to estimate the interval.
I refactored "I tried to make a script that saves posted images at once by going back to the tweets of a specific user on Twitter".
[Python] I tried to visualize the night on the Galactic Railroad with WordCloud!
I tried to verify the best way to find a good marriage partner
I tried to communicate with a remote server by Socket communication with Python.
I tried to implement a blockchain that actually works with about 170 lines
I made a kitchen timer to be displayed on the status bar!
Matching karaoke keys ~ I tried to put it on Laravel ~ <on the way>
I tried to automatically extract the movements of PES players with software
I tried to develop a Formatter that outputs Python logs in JSON
I tried with the top 100 PyPI packages> I tried to graph the packages installed on Python
I want to identify the alert email. --Is that x a wildcard? ---
I tried to understand the decision tree (CART) that makes the classification carefully
I made a library konoha that switches the tokenizer to a nice feeling
Linux screen distribution on Ubuntu Memo that wants to be a Linux screen distribution YouTuber
I tried to display the altitude value of DTM in a graph
I tried to verify the result of A / B test by chi-square test
I tried to wake up the place name that appears in the lyrics of Masashi Sada on the heat map
I tried to create a linebot (implementation)