{"id":25020,"date":"2026-10-20T12:19:45","date_gmt":"2026-10-20T12:19:45","guid":{"rendered":"https:\/\/atalnetworks.com\/?p=25020"},"modified":"2026-10-20T12:27:23","modified_gmt":"2026-10-20T12:27:23","slug":"mdadm-software-raid-bare-metal-server","status":"publish","type":"post","link":"https:\/\/atalnetworks.com\/el\/mdadm-software-raid-bare-metal-server\/","title":{"rendered":"How to Set Up Software RAID on a Bare Metal Server (mdadm)"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Software RAID lets Linux combine physical drives into one storage device. With <\/span><span style=\"font-weight: 400;\">mdadm<\/span><span style=\"font-weight: 400;\">, two data drives can form a RAID 1 mirror so the array remains available if one drive fails. The important work goes beyond creating <\/span><span style=\"font-weight: 400;\">\/dev\/md0<\/span><span style=\"font-weight: 400;\">: you must identify the right disks, confirm the array returns after a reboot, receive failure alerts, and know how to replace a member.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This guide builds a <\/span><b>new data mirror<\/b><span style=\"font-weight: 400;\"> from two empty drives on a bare-metal server running Ubuntu Server 24.04 LTS. It does not convert a live operating-system disk into RAID. Creating partitions and formatting the wrong device can erase a working server, so verify every drive by serial number before running the write commands.<\/span><\/p>\n<h2><strong>Before you begin: confirm the drives and your recovery path<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">The example server has three physical drives:<\/span><\/p>\n<table>\n<thead>\n<tr>\n<th><b>Example device<\/b><\/th>\n<th><b>Role<\/b><\/th>\n<th><b>Action in this guide<\/b><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">\/dev\/sda<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Existing Ubuntu system drive<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Leave untouched<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\/dev\/sdb<\/span><\/td>\n<td><span style=\"font-weight: 400;\">First empty data drive<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Create a RAID member partition<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\/dev\/sdc<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Second empty data drive<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Create a RAID member partition<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Your server may use different names, especially with NVMe drives. <\/span><span style=\"font-weight: 400;\">\/dev\/sdb<\/span><span style=\"font-weight: 400;\"> is an example, not a reliable way to identify hardware. Check the serial number, model, size, and stable <\/span><span style=\"font-weight: 400;\">\/dev\/disk\/by-id\/<\/span><span style=\"font-weight: 400;\"> link against your provider&#8217;s inventory. A device name can change after a reboot or replacement.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Have a recent off-server backup and confirm you can restore it. Arrange remote console or rescue access before modifying storage on a machine you administer only over SSH. Check whether a hardware RAID controller exposes physical drives directly; if Linux sees only a single controller volume, the procedure below does not describe that layout. Ask the provider how replacement drives are identified and swapped.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Start with read-only checks:<\/span><\/p>\n<p style=\"padding-left: 40px;\">cat \/etc\/os-release<\/p>\n<p style=\"padding-left: 40px;\">findmnt -no SOURCE \/<\/p>\n<p style=\"padding-left: 40px;\">lsblk -o NAME,PATH,SIZE,TYPE,FSTYPE,MOUNTPOINTS,MODEL,SERIAL<\/p>\n<p style=\"padding-left: 40px;\">ls -l \/dev\/disk\/by-id\/<\/p>\n<p style=\"padding-left: 40px;\">sudo wipefs -n \/dev\/sdb<\/p>\n<p style=\"padding-left: 40px;\">sudo wipefs -n \/dev\/sdc<\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">wipefs -n<\/span><span style=\"font-weight: 400;\"> option reports signatures without erasing them. Stop if either proposed data drive has a partition, filesystem, RAID signature, LVM membership, or data you need to preserve. Also stop if you cannot confidently map the listed devices to physical bays or serial numbers.<\/span><\/p>\n<h2><strong>Choose the RAID level before partitioning<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">For two drives that must survive one disk failure, RAID 1 is the straightforward choice. Other levels serve different goals:<\/span><\/p>\n<table>\n<thead>\n<tr>\n<th><b>Level<\/b><\/th>\n<th><b>Usual minimum drives<\/b><\/th>\n<th><b>Approximate usable capacity with equal drives<\/b><\/th>\n<th><b>Failure tolerance<\/b><\/th>\n<th><b>Typical fit<\/b><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">RAID 0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">All drive capacity<\/span><\/td>\n<td><span style=\"font-weight: 400;\">None<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Disposable scratch data<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">RAID 1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">One drive&#8217;s capacity with two members<\/span><\/td>\n<td><span style=\"font-weight: 400;\">One of two drives<\/span><\/td>\n<td><span style=\"font-weight: 400;\">OS or production data mirror<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">RAID 5<\/span><\/td>\n<td><span style=\"font-weight: 400;\">3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">(N &#8211; 1) \u00d7 drive capacity<\/span><\/td>\n<td><span style=\"font-weight: 400;\">One drive<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Capacity-oriented workloads after rebuild and write-risk review<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">RAID 6<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">(N &#8211; 2) \u00d7 drive capacity<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Two drives<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Larger arrays that need two-drive fault tolerance<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">RAID 10<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Commonly 4 for paired mirrors<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Roughly half of total capacity<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Depends on which members fail<\/span><\/td>\n<td><span style=\"font-weight: 400;\">I\/O-heavy workloads with several drives<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">These are planning figures before filesystem overhead. Linux MD supports layouts that differ from the usual four-drive RAID 10 arrangement, so document the exact layout rather than assuming every RAID 10 array has identical failure behavior. A pair of 1 TB manufacturer-rated drives in RAID 1 provides about 1 TB of raw mirrored capacity, which Linux displays in smaller TiB units.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">RAID protects availability against specified drive failures. It does not recover an accidentally deleted file, a damaged database, ransomware-encrypted data, or the loss of the entire server location. Keep independent backups and test restores.<\/span><\/p>\n<h2><strong>Understand the storage stack<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">The example uses one Linux RAID partition on each empty drive. <\/span><span style=\"font-weight: 400;\">mdadm<\/span><span style=\"font-weight: 400;\"> combines those partitions into <\/span><span style=\"font-weight: 400;\">\/dev\/md0<\/span><span style=\"font-weight: 400;\">. The ext4 filesystem sits on <\/span><span style=\"font-weight: 400;\">\/dev\/md0<\/span><span style=\"font-weight: 400;\">, and the application accesses it through <\/span><span style=\"font-weight: 400;\">\/srv\/data<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p style=\"padding-left: 40px;\">\/dev\/sdb1 + \/dev\/sdc1\u00a0 -&gt;\u00a0 \/dev\/md0\u00a0 -&gt;\u00a0 ext4\u00a0 -&gt;\u00a0 \/srv\/data<\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0RAID members \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 MD array \u00a0 \u00a0 filesystem \u00a0 mount point<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Format the MD device once. Do not create separate filesystems on the member partitions. An optional LVM layer can sit above the array when you need logical-volume flexibility, but it adds decisions that the basic mirror does not require.<\/span><\/p>\n<h2><strong>Create a RAID 1 data array on Ubuntu Server 24.04<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Run the next steps only when <\/span><span style=\"font-weight: 400;\">\/dev\/sdb<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">\/dev\/sdc<\/span><span style=\"font-weight: 400;\"> are confirmed empty data drives and <\/span><span style=\"font-weight: 400;\">\/dev\/sda<\/span><span style=\"font-weight: 400;\"> is the existing OS drive. Substitute the actual devices on your server. On NVMe, a member partition may look like <\/span><span style=\"font-weight: 400;\">\/dev\/nvme1n1p1<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h3><strong>1. Install mdadm and confirm drive identity again<\/strong><\/h3>\n<p style=\"padding-left: 40px;\">sudo apt update<\/p>\n<p style=\"padding-left: 40px;\">sudo apt install mdadm gdisk<\/p>\n<p style=\"padding-left: 40px;\">findmnt -no SOURCE \/<\/p>\n<p style=\"padding-left: 40px;\">lsblk -o NAME,PATH,SIZE,TYPE,FSTYPE,MOUNTPOINTS,MODEL,SERIAL<\/p>\n<p><span style=\"font-weight: 400;\">Compare the output with your recorded drive serials. Do not proceed if the system partition or any mounted data volume appears on either selected drive.<\/span><\/p>\n<h3><strong>2. Partition the two empty drives<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">The following commands <\/span><b>replace the partition tables<\/b><span style=\"font-weight: 400;\"> on the named disks. <\/span><span style=\"font-weight: 400;\">sgdisk -o<\/span><span style=\"font-weight: 400;\"> creates a GPT table. <\/span><span style=\"font-weight: 400;\">-n 1:0:0<\/span><span style=\"font-weight: 400;\"> creates a first partition using the available space, and <\/span><span style=\"font-weight: 400;\">-t 1:FD00<\/span><span style=\"font-weight: 400;\"> marks it for Linux RAID.<\/span><\/p>\n<p style=\"padding-left: 40px;\">sudo sgdisk -o -n 1:0:0 -t 1:FD00 \/dev\/sdb<\/p>\n<p style=\"padding-left: 40px;\">sudo sgdisk -o -n 1:0:0 -t 1:FD00 \/dev\/sdc<\/p>\n<p style=\"padding-left: 40px;\">sudo partprobe \/dev\/sdb \/dev\/sdc<\/p>\n<p style=\"padding-left: 40px;\">lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS \/dev\/sdb \/dev\/sdc<\/p>\n<p><span style=\"font-weight: 400;\">Confirm that <\/span><span style=\"font-weight: 400;\">\/dev\/sdb1<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">\/dev\/sdc1<\/span><span style=\"font-weight: 400;\"> exist and have suitable matching sizes. If the kernel cannot reread a new partition table because the device is busy, stop and investigate. Do not push ahead with a different device name.<\/span><\/p>\n<h3><strong>3. Create the mirror and observe synchronization<\/strong><\/h3>\n<p style=\"padding-left: 40px;\">sudo mdadm &#8211;create \/dev\/md0 &#8211;level=1 &#8211;raid-devices=2 \/dev\/sdb1 \/dev\/sdc1<\/p>\n<p style=\"padding-left: 40px;\">cat \/proc\/mdstat<\/p>\n<p style=\"padding-left: 40px;\">sudo mdadm &#8211;detail \/dev\/md0<\/p>\n<p><span style=\"font-weight: 400;\">&#8211;level=1<\/span><span style=\"font-weight: 400;\"> requests mirroring, and <\/span><span style=\"font-weight: 400;\">&#8211;raid-devices=2<\/span><span style=\"font-weight: 400;\"> declares two active members. <\/span><span style=\"font-weight: 400;\">mdadm<\/span><span style=\"font-weight: 400;\"> may warn that its default metadata placement needs special care for a boot device. This example is a data array; the boot plan appears later.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In <\/span><span style=\"font-weight: 400;\">\/proc\/mdstat<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">[2\/2] [UU]<\/span><span style=\"font-weight: 400;\"> indicates that both members are present. A <\/span><span style=\"font-weight: 400;\">resync<\/span><span style=\"font-weight: 400;\"> progress line can appear while the initial mirror is being built. Wait for synchronization to finish before declaring setup complete. A status such as <\/span><span style=\"font-weight: 400;\">[U_]<\/span><span style=\"font-weight: 400;\"> indicates a missing or failed member and needs investigation.<\/span><\/p>\n<h3><strong>4. Create a filesystem and mount it<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">The next <\/span><span style=\"font-weight: 400;\">mkfs<\/span><span style=\"font-weight: 400;\"> command <\/span><b>destroys any existing filesystem on <\/b><b>\/dev\/md0<\/b><span style=\"font-weight: 400;\">. Confirm the MD array is the new one you just created.<\/span><\/p>\n<p style=\"padding-left: 40px;\">sudo mkfs.ext4 -L data_raid1 \/dev\/md0<\/p>\n<p style=\"padding-left: 40px;\">sudo mkdir -p \/srv\/data<\/p>\n<p style=\"padding-left: 40px;\">sudo mount \/dev\/md0 \/srv\/data<\/p>\n<p style=\"padding-left: 40px;\">findmnt \/srv\/data<\/p>\n<p style=\"padding-left: 40px;\">df -hT \/srv\/data<\/p>\n<p style=\"padding-left: 40px;\">sudo blkid \/dev\/md0<\/p>\n<p><span style=\"font-weight: 400;\">Use the UUID from <\/span><span style=\"font-weight: 400;\">blkid<\/span><span style=\"font-weight: 400;\"> for the permanent mount. Set ownership and access permissions for your application after deciding which service account should write to <\/span><span style=\"font-weight: 400;\">\/srv\/data<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h3><strong>5. Save assembly settings and make the mount persistent<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">First inspect the generated array definition and the current configuration:<\/span><\/p>\n<p style=\"padding-left: 40px;\">sudo mdadm &#8211;detail &#8211;scan<\/p>\n<p style=\"padding-left: 40px;\">sudo grep &#8216;^ARRAY &#8216; \/etc\/mdadm\/mdadm.conf<\/p>\n<p><span style=\"font-weight: 400;\">Edit <\/span><span style=\"font-weight: 400;\">\/etc\/mdadm\/mdadm.conf<\/span><span style=\"font-weight: 400;\"> so it contains <\/span><b>one correct <\/b><b>ARRAY<\/b><b> line for this array<\/b><span style=\"font-weight: 400;\">. Do not repeatedly append the scan output; duplicate or outdated entries complicate troubleshooting. Rebuild Ubuntu&#8217;s initramfs:<\/span><\/p>\n<p style=\"padding-left: 40px;\">sudo update-initramfs -u<\/p>\n<p><span style=\"font-weight: 400;\">Add a line to <\/span><span style=\"font-weight: 400;\">\/etc\/fstab<\/span><span style=\"font-weight: 400;\"> using the <\/span><b>filesystem UUID reported for <\/b><b>\/dev\/md0<\/b><span style=\"font-weight: 400;\">, not the example value below:<\/span><\/p>\n<p style=\"padding-left: 40px;\">UUID=&lt;your-ext4-filesystem-UUID&gt;\u00a0 \/srv\/data\u00a0 ext4\u00a0 defaults\u00a0 0\u00a0 2<\/p>\n<p><span style=\"font-weight: 400;\">defaults<\/span><span style=\"font-weight: 400;\"> makes the mount a normal boot dependency. If the data volume is optional and you deliberately want the system to boot when it is unavailable, assess <\/span><span style=\"font-weight: 400;\">nofail<\/span><span style=\"font-weight: 400;\"> and your application&#8217;s dependency behavior before choosing it. An apparently successful boot with an unmounted data directory can cause an application to write onto the root filesystem instead.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Validate the entry while you still have console access:<\/span><\/p>\n<p style=\"padding-left: 40px;\">sudo findmnt &#8211;verify<\/p>\n<p style=\"padding-left: 40px;\">sudo umount \/srv\/data<\/p>\n<p style=\"padding-left: 40px;\">sudo mount \/srv\/data<\/p>\n<p style=\"padding-left: 40px;\">findmnt \/srv\/data<\/p>\n<p><span style=\"font-weight: 400;\">Schedule a controlled reboot. After the server returns, verify both assembly and mounting:<\/span><\/p>\n<p style=\"padding-left: 40px;\">cat \/proc\/mdstat<\/p>\n<p style=\"padding-left: 40px;\">sudo mdadm &#8211;detail \/dev\/md0<\/p>\n<p style=\"padding-left: 40px;\">findmnt \/srv\/data<\/p>\n<p><span style=\"font-weight: 400;\">Look for both active members, no failed devices, the expected filesystem, and the intended mount point. Keep the recorded drive serials and array UUID with the server&#8217;s maintenance notes.<\/span><\/p>\n<h2><strong>Monitor array health, physical drives, and backup restores<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">A RAID 1 server can keep serving requests with one failed drive. That continued operation is useful, but it can hide the failure until the second drive has a problem. Check <\/span><span style=\"font-weight: 400;\">mdadm<\/span><span style=\"font-weight: 400;\"> status and deliver alerts to someone who will act on them.<\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"font-weight: 400;\">cat \/proc\/mdstat<\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"font-weight: 400;\">sudo mdadm &#8211;detail \/dev\/md0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">mdadm.conf<\/span> <span style=\"font-weight: 400;\">MAILADDR<\/span><span style=\"font-weight: 400;\"> setting can direct monitor alerts, but an email address alone is insufficient. Confirm that the monitor is running on the installed Ubuntu image, configure a working mail relay or event handler, and test end-to-end delivery. A test event can be generated with:<\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"font-weight: 400;\">sudo mdadm &#8211;monitor &#8211;scan &#8211;oneshot &#8211;test<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Inspect each physical drive&#8217;s SMART or NVMe health information as well. Array status and drive diagnostics answer different questions: an MD array can be clean while a device reports concerning media or controller errors. A periodic MD consistency check can identify disagreements between members, but interpreting <\/span><span style=\"font-weight: 400;\">mismatch_cnt<\/span><span style=\"font-weight: 400;\"> requires care; it does not independently tell you which copy is correct. Follow the Linux kernel MD guidance before repairing mismatches.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Finally, restore a sample file or application backup to a separate location. A mirrored array is not proof that a backup can recover the service.<\/span><\/p>\n<h2><strong>Replace a failed RAID 1 member<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Treat drive replacement as a controlled maintenance task. Before touching hardware, confirm the current array state with <\/span><span style=\"font-weight: 400;\">mdadm &#8211;detail<\/span><span style=\"font-weight: 400;\">, map its member partition to a <\/span><b>physical serial number<\/b><span style=\"font-weight: 400;\">, and verify a usable backup. Never assume that <\/span><span style=\"font-weight: 400;\">\/dev\/sdc<\/span><span style=\"font-weight: 400;\"> still refers to the same bay after a replacement.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Identify the failed member.<\/b><span style=\"font-weight: 400;\"> Record the array UUID, healthy member, device serials, and current <\/span><span style=\"font-weight: 400;\">[U_]<\/span><span style=\"font-weight: 400;\"> or <\/span><span style=\"font-weight: 400;\">[_U]<\/span><span style=\"font-weight: 400;\"> status. Investigate controller and system logs for the underlying error.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Remove only the failed member from the array.<\/b><span style=\"font-weight: 400;\"> If the member still appears active but has confirmed hardware faults, use <\/span><span style=\"font-weight: 400;\">mdadm &#8211;manage \/dev\/md0 &#8211;fail &lt;failed-member-partition&gt;<\/span><span style=\"font-weight: 400;\"> and then <\/span><span style=\"font-weight: 400;\">&#8211;remove &lt;failed-member-partition&gt;<\/span><span style=\"font-weight: 400;\">. A member already marked faulty may only need removal. Never run these commands against the sole healthy copy.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Arrange the physical replacement.<\/b><span style=\"font-weight: 400;\"> Coordinate with the provider or use an approved hot-swap procedure. Match the serial and bay before and after the swap.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Partition the new disk.<\/b><span style=\"font-weight: 400;\"> Reproduce the intended RAID member partition, ensuring its usable size is at least as large as the array requires. If copying a GPT layout, give the new disk its own disk and partition GUIDs. Inspect the result before adding it.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Add the new member partition and watch recovery.<\/b><span style=\"font-weight: 400;\"> For a replacement now identified as <\/span><span style=\"font-weight: 400;\">\/dev\/sdc1<\/span><span style=\"font-weight: 400;\">, the command is <\/span><span style=\"font-weight: 400;\">sudo mdadm &#8211;manage \/dev\/md0 &#8211;add \/dev\/sdc1<\/span><span style=\"font-weight: 400;\">. Follow <\/span><span style=\"font-weight: 400;\">\/proc\/mdstat<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">mdadm &#8211;detail<\/span><span style=\"font-weight: 400;\"> until recovery finishes and both members are active.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Recheck operations.<\/b><span style=\"font-weight: 400;\"> Confirm alerts, physical-drive health, backups, and the mount. If this was also a boot disk, restore and test its boot path separately.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">A simulated <\/span><span style=\"font-weight: 400;\">&#8211;fail<\/span><span style=\"font-weight: 400;\"> test exercises array management. It does not validate bay identification, hot-swap wiring, firmware boot entries, or the provider&#8217;s physical replacement process.<\/span><\/p>\n<h2><strong>Bootable RAID 1 requires more than a mirrored root filesystem<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">The walkthrough above assumes Ubuntu already boots from a separate system drive. If the operating system itself must survive a boot-drive failure, plan the layout during a fresh installation or follow a separately tested migration procedure. First check the firmware mode:<\/span><\/p>\n<p><strong>[ -d \/sys\/firmware\/efi ] &amp;&amp; echo UEFI || echo BIOS<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th><b>Boot mode<\/b><\/th>\n<th><b>Additional work beyond an MD root mirror<\/b><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">UEFI<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Provide a usable EFI System Partition on each intended boot disk, keep boot files current on both, maintain firmware boot entries, and test each disk independently. The ESP is commonly managed separately from the MD root array.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Legacy BIOS<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Install a working bootloader path on each intended boot disk, meet the partitioning requirements of the boot mode, and test both drives.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">The initramfs must also be able to assemble the root array. A server that serves data after one disk fails may still be unable to restart if the surviving disk lacks a valid boot path. Provider rescue access and a real one-disk boot test establish the answer. Follow documentation for the exact firmware, distribution, installer, and storage layout rather than reusing the data-array commands as a root-disk migration recipe.<\/span><\/p>\n<h2><strong>Troubleshoot common mdadm problems<\/strong><\/h2>\n<table>\n<thead>\n<tr>\n<th><b>Symptom<\/b><\/th>\n<th><b>First safe checks<\/b><\/th>\n<th><b>Likely next decision<\/b><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">\/proc\/mdstat<\/span><span style=\"font-weight: 400;\"> shows <\/span><span style=\"font-weight: 400;\">[U_]<\/span><span style=\"font-weight: 400;\"> or <\/span><span style=\"font-weight: 400;\">[_U]<\/span><\/td>\n<td><span style=\"font-weight: 400;\">mdadm &#8211;detail<\/span><span style=\"font-weight: 400;\">, drive serials, system logs<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Diagnose the member and controller; replace the correct drive.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Resync is taking longer than expected<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\/proc\/mdstat<\/span><span style=\"font-weight: 400;\">, drive health, workload and I\/O logs<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check errors and load; do not assume a fixed rebuild time.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Array returns under an unexpected MD name<\/span><\/td>\n<td><span style=\"font-weight: 400;\">mdadm &#8211;detail &#8211;scan<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">mdadm.conf<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">lsblk<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Resolve duplicate or foreign assembly configuration; rely on filesystem UUID for the mount.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Data directory is not mounted after reboot<\/span><\/td>\n<td><span style=\"font-weight: 400;\">findmnt<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">blkid<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">\/etc\/fstab<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">journalctl<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Fix the UUID, assembly or boot ordering before starting the application.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Replacement partition cannot be added<\/span><\/td>\n<td><span style=\"font-weight: 400;\">lsblk<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">sgdisk -p<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">mdadm &#8211;detail<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check its actual usable size and old RAID signatures before altering it.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">MD state looks clean but drive errors appear<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SMART\/NVMe logs and kernel messages<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Investigate the physical disk; a clean array state does not certify hardware.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Server cannot boot after a disk is removed<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remote console, firmware entries, ESP or GRUB state<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Restore the missing boot path using the appropriate BIOS or UEFI procedure.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Avoid <\/span><span style=\"font-weight: 400;\">mdadm &#8211;assemble &#8211;force<\/span><span style=\"font-weight: 400;\">, signature erasure, or repair commands as a first response to an unclear state. Preserve the healthy member and backup while you determine what failed.<\/span><\/p>\n<h2><strong>Match the storage plan to the workload<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">A two-drive RAID 1 mirror is a practical starting point for application data or a planned system installation where single-drive availability matters. Four or more drives may justify RAID 10 for an I\/O-heavy database or virtual-machine host, but capacity, layout, and failure patterns still require design review. RAID 0 belongs only where losing the entire array is acceptable. Large parity arrays need closer review of rebuild time and write behavior.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you are selecting a new server, confirm the physical drive count, interface, replacement process, remote-console access, and backup plan before choosing a RAID level. <\/span><a href=\"https:\/\/atalnetworks.com\/bare-metal-servers\/\"><span style=\"font-weight: 400;\">Explore Atal Networks&#8217; bare metal server options<\/span><\/a><span style=\"font-weight: 400;\"> and ask which storage configuration is available for the specific machine and location.<\/span><\/p>\n<h2><strong>Frequently asked questions<\/strong><\/h2>\n<h3><span style=\"font-weight: 400;\">Does RAID 1 replace backups?<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">No. Both mirror members can contain the same deleted, encrypted, or corrupted data. Keep separate backups, retain appropriate history, and test a restore.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Can I add RAID 1 to an existing server without losing data?<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">It can be done with a carefully designed migration, but the empty-disk creation commands in this guide are destructive. Back up the server and use a migration procedure for its exact disk and boot layout.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Will the server boot if one RAID 1 drive fails?<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Only if the firmware, bootloader, required boot partitions, and MD root assembly work from the surviving drive. Test both boot paths with remote console access.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Can I mirror a SATA SSD and an NVMe drive?<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Linux MD can combine block devices exposed by different storage interfaces. The usable size follows the smaller member, and the devices may differ in speed, endurance, and failure characteristics. Matched drives are generally simpler to operate.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">How long will the RAID 1 rebuild take?<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">There is no reliable universal time. Drive capacity, sustained I\/O, interface speed, media health, and concurrent workloads all matter. Watch the reported recovery progress and errors rather than trusting a fixed estimate.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Can a clean array contain a failing disk?<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Yes. A clean MD state describes array synchronization; it does not replace physical health checks. Review SMART or NVMe logs and system errors alongside the array state.<\/span><\/p>\n<h2><strong>Final verification checklist<\/strong><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Both RAID member partitions match the intended physical drive serials.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Initial synchronization has finished and <\/span><span style=\"font-weight: 400;\">\/proc\/mdstat<\/span><span style=\"font-weight: 400;\"> shows both members active.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The array assembles and <\/span><span style=\"font-weight: 400;\">\/srv\/data<\/span><span style=\"font-weight: 400;\"> mounts after a controlled reboot.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">A test alert reaches the person or system responsible for replacement.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">An off-server backup restores successfully. For OS mirrors, both single-disk boot paths have been tested.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">That is the difference between an array that was created and a storage setup you can operate when a drive fails.<\/span><\/p>\n<h2><strong>Technical references<\/strong><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/man7.org\/linux\/man-pages\/man8\/mdadm.8.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">mdadm manual<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/man7.org\/linux\/man-pages\/man5\/mdadm.conf.5.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">mdadm.conf manual<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/cdn.kernel.org\/doc\/html\/latest\/admin-guide\/md.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Linux kernel MD documentation<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/documentation.ubuntu.com\/server\/how-to\/installation\/index.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Ubuntu Server installation documentation<\/span><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Software RAID lets Linux combine physical drives into one storage device. With mdadm, two data drives can form a RAID [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":25025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25020","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-grade-server"],"acf":[],"_links":{"self":[{"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/posts\/25020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/comments?post=25020"}],"version-history":[{"count":4,"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/posts\/25020\/revisions"}],"predecessor-version":[{"id":25024,"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/posts\/25020\/revisions\/25024"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/media\/25025"}],"wp:attachment":[{"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/media?parent=25020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/categories?post=25020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atalnetworks.com\/el\/wp-json\/wp\/v2\/tags?post=25020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}