• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • AI Agents
    • OpenClaw
    • Claude Code
    • n8n
    • Hermes Agent
    • Open WebUI
    • Docker
  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
    • Email Hosting
    • HeroicGuard
    • GPU Hosting
    • Website Builder
  • VPS
    • Managed VPS
    • Unmanaged VPS
    • Flex VPS
  • Reseller
  • Gaming
  • Domains
  • Account
  • Blog Home
  • Categories
  • Authors

How To Check The Status Of Software Raid On Linux

CJ Saathoff

Published on: August 6, 2024

Categories: Linux Command Line 0

Do you have a server with software raid and are looking to check its status? If so this article is for you, we will look at how to check the raid array status as well as how to check specific disks in the context of the RAID array.

Table of Contents
  • What Is RAID?
    • Introduction To Software Raid
  • Using /proc/mdstat
    • Understanding The Results
  • Using Mdadm To Check Raid Status
    • Understanding The Results
  • Using Mdadm To Check A Disk
    • Understanding The Results
  • Logs
  • Conclusion
  • Additional Links

What Is RAID?

The term RAID stands for redundant array of inexpensive disks, it is a technology that allows you to combine multiple disks into one or more logical units. With RAID arrays you can increase redundancy, performance, or both.

Introduction To Software Raid

Before software RAID arrays, raid was typically done with a hardware device that would be between the disks and the rest of the system.

Since software RAID was added the need for a separate hardware device has been greatly reduced if not eliminated. On Linux, software raid is provided by the utility mdadm.

Using /proc/mdstat

If you are looking for quick stats on your RAID array this is the command you want.

user@example:~$ cat /proc/mdstat 
Personalities : [raid1] 
md0 : active raid1 sdb[1] sdc[0]
      10476544 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>

Understanding The Results

md0 : active raid1 sdb[1] sdc[0]

  • md0 is the name of the array
  • active means the array is active
  • List the raid level which in this case is raid1
  • sdb and sdc are members of the array

10476544 blocks super 1.2 [2/2] [UU]

  • 10476544 blocks is the size of the array
  • super 1.2 indicated the version of superblock used
  • [2/2] means the array is composed of 2 devices both of which are active
  • [UU] is the status of the drives in the array

Using Mdadm To Check Raid Status

Both the -D and –details flags for mdadm will display even more detailed information about the array and an example is shown below.

user@example:~$ sudo mdadm -D /dev/md0
/dev/md0:
           Version : 1.2
     Creation Time : Wed Jun 19 11:54:22 2024
        Raid Level : raid1
        Array Size : 10476544 (9.99 GiB 10.73 GB)
     Used Dev Size : 10476544 (9.99 GiB 10.73 GB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent

       Update Time : Wed Jun 19 11:57:41 2024
             State : clean 
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

Consistency Policy : resync

              Name : example:0  (local to host example)
              UUID : 359234d1:da054d1a:a883c4b3:aebf5906
            Events : 22

    Number   Major   Minor   RaidDevice State
       0       8       32        0      active sync   /dev/sdc
       1       8       16        1      active sync   /dev/sdb

Understanding The Results

Let’s dive into the results to understand what everything means:

Version : 1.2

1.2 indicated the version of the superblock used

Creation Time : Wed Jun 19 11:54:22 2024

When the RAID array was created

Raid Level : raid1

The RAID level of the array, in this case, that is RAID 1 (mirroring)

Array Size : 10476544 (9.99 GiB 10.73 GB)

This is the usable size of the array

Used Dev Size : 10476544 (9.99 GiB 10.73 GB)

This is the space used on each device

Raid Devices : 2

The number of devices in the current array

Total Devices : 2

All related devices included spares and failed devices

Persistence : Superblock is persistent

Indicates the metadata about the array is stored on the disks

Update Time : Wed Jun 19 11:57:41 2024

When the status of the array was last updated

State : clean

The state of the RAID array, where clean means everything is good

Active Devices : 2

The number of devices active in the array

Working Devices : 2

The number of working devices in the array

Failed Devices : 0

The number of failed devices in the array

Spare Devices : 0

The number of spare devices in the array

Consistency Policy : resync

Indicated the policy used to maintain data consistency

Name : example:0 (local to host example)

The hostname and array number

UUID : 359234d1:da054d1a:a883c4b3:aebf5906

The UUID of the array

Events : 22

The number of recorded events for the array

Number Major Minor RaidDevice State 0 8 32 0 active sync /dev/sdc 1 8 16 1 active sync /dev/sdb

Shows both disks are active and in sync now but if a disk has failed you will find it here.

Using Mdadm To Check A Disk

This section uses mdadm to pull information on a single disk.

user@example:~$ sudo mdadm -E /dev/sdc
/dev/sdc:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 359234d1:da054d1a:a883c4b3:aebf5906
           Name : example:0  (local to host example)
  Creation Time : Wed Jun 19 11:54:22 2024
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 20953088 sectors (9.99 GiB 10.73 GB)
     Array Size : 10476544 KiB (9.99 GiB 10.73 GB)
    Data Offset : 18432 sectors
   Super Offset : 8 sectors
   Unused Space : before=18280 sectors, after=0 sectors
          State : clean
    Device UUID : 3e5fb78b:c0444da6:c61f5cc9:557b629b

    Update Time : Wed Jun 19 11:57:03 2024
  Bad Block Log : 512 entries available at offset 136 sectors
       Checksum : 5cc406ac - correct
         Events : 22


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)

Understanding The Results

Magic : a92b4efc

An identifier indicating RAID metadata

Version : 1.2

1.2 indicated the version of superblock used

Feature Map : 0x0

Bitmask indicates features

Array UUID : 359234d1:da054d1a:a883c4b3:aebf5906

The UUID of the array

Name : example:0 (local to host example

The hostname and array number

Creation Time : Wed Jun 19 11:54:22 2024

When the RAID array was created

Raid Level : raid1

The RAID level of the array, in this case, that is RAID 1 (mirroring)

Raid Devices : 2

The number of devices in the raid array

Avail Dev Size : 20953088 sectors (9.99 GiB 10.73 GB)

The available size of the device in sectors, GiB, and GB.

Array Size : 10476544 KiB (9.99 GiB 10.73 GB)

The total size of the raid array

Data Offset : 18432 sectors

The offset where the data starts on the device

Super Offset : 8 sectors

The offset where RAID metadata starts on the device

Unused Space : before=18280 sectors, after=0 sectors

The amount of unused space before and after the RAID data

State : clean

The state of the RAID array, where clean means everything is good

Device UUID : 3e5fb78b:c0444da6:c61f5cc9:557b629b

The UUID of this specific disk

Update Time : Wed Jun 19 11:57:03 2024

When the status of the array was last updated

Bad Block Log : 512 entries available at offset 136 sectors

Information on how many entries are in the bad block log and where it is located on the disk

Checksum : 5cc406ac – correct

The checksum of the RAID metadata shows it is correct

Events : 22

The number of recorded events for the array

Device Role : Active device 0

The device number from the array starting at 0

Array State : AA (‘A’ active, ‘.’ missing, ‘R’ == replacing)

The state of the array showing both disks active

Logs

Logs for software raid will log to the location that kernel messages will be saved to. The most common locations for kernel messages are listed below:

  • /var/log/kern.log
  • /var/log/messages
  • /var/log/syslog
  • The dmesg command
  • Systemd Journal using journalctl

Conclusion

With Software RAID you no longer need to rely on hardware raid cards. In this blog post, we discuss how to check the status of your software raid on your Linux server. We also go through what everything means so you will be sure to understand.

Additional Links

Done reading and looking for additional information, why not check these out/

  • Linux kernel RAID Wiki
  • Wikipedia Mdadm
CJ Saathoff

Embracing a lifelong passion for technology since childhood, CJ delved into the intricate workings of systems, captivated by the desire to understand the unknown. This innate curiosity led to his discovery of Linux, a revelation that resonated deeply. With more than 7 years of on the job experience, he’s honed his technical skills as a Geek and Senior Linux Systems Administrator.

Related Posts

All About Bash Parameter Expansion

Parameter expansion in bash is very useful when working with strings like filenames and log entries. It allows you to clean up text.

Using Systemctl to Enable Services on Boot on Linux

You can use the systemctl tool to start services automatically on boot. We do this using the "enable" keyword.

How to Use Ufw to Open Port 80 in Linux

In Linux, particularly on Ubuntu system, here's how we can use ufw to open port 80. No need to mess with IPTables directly!

Dealing with Cron Job Logs in Linux

Cron job logs keep track of which cron jobs run, and their details. This helps with troubleshooting and performance management.

Reader Interactions

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • OpenClaw Hosting
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • Managed VPS Hosting
  • Unmanaged VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • GPU Hosting
  • Email Hosting
  • HeroicGuard
  • Domains
  • Website Builder
  • AI Agent Hosting
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2026 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA