Monitoring Software RAID 1 Resync Progress: Checking Status and Troubleshooting Exclamation Marks


1 views

When setting up a new software RAID 1 array or replacing a failed disk, the resynchronization process can take significant time. For a 500GB drive with 150GB of data on a system with AMD dual-core 4000+ CPU and 4GB RAM, expect between 2-10 hours under normal circumstances. However, several factors affect duration:


# Possible performance factors:
- Disk interface speed (SATA II vs SATA III)
- Disk RPM (5400 vs 7200)
- System load during sync
- Filesystem fragmentation
- Kernel version and mdadm parameters

Several methods exist to monitor RAID resync status:


# Method 1: Using cat
cat /proc/mdstat

# Sample output:
Personalities : [raid1] 
md0 : active raid1 sdb1[1] sda1[0]
      488386552 blocks super 1.2 [2/2] [UU]
      [>....................] resync =  4.2% (20645376/488386552) finish=102.7min speed=76036K/sec
      
# Method 2: Using mdadm
mdadm --detail /dev/md0 | grep -i resync

# Method 3: Continuous monitoring
watch -n 5 cat /proc/mdstat

The yellow exclamation mark typically indicates one of these conditions:


# Possible causes:
1. Degraded array (missing disk)
2. Mismatched superblocks
3. Incomplete resync
4. Reallocation sector count warning

# Diagnostic commands:
smartctl -a /dev/sda | grep -i reallocated
mdadm --examine /dev/sd[ab] | grep -i state

To speed up the process or check for issues:


# Temporary speed boost (root required):
echo 50000 > /proc/sys/dev/raid/speed_limit_min
echo 200000 > /proc/sys/dev/raid/speed_limit_max

# Permanent setting (add to /etc/sysctl.conf):
dev.raid.speed_limit_min = 50000
dev.raid.speed_limit_max = 200000

# Check for disk errors:
badblocks -sv /dev/sdb > badblocks.log

If resync appears frozen:


# Check kernel messages:
dmesg | grep -i md

# Force check array:
mdadm --manage /dev/md0 --action=check

# Emergency stop (caution!):
mdadm --stop /dev/md0
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1

When setting up a software RAID 1 array in Linux, the initial synchronization process can take significant time depending on hardware specifications and data volume. For a 500GB drive with 150GB of data on a system with 4GB RAM and an AMD dual-core 4000+, expect the process to take anywhere from 2-8 hours under normal conditions.

The most reliable way to check resync status is through the /proc/mdstat file:

cat /proc/mdstat

Example output during resync:

Personalities : [raid1] 
md0 : active raid1 sdb1[1] sda1[0]
      488383936 blocks [2/2] [UU]
      [>....................]  resync =  4.3% (21231872/488383936) finish=102.5min speed=76094K/sec

For more comprehensive information about your RAID array:

mdadm --detail /dev/md0

This command provides:

  • Current resync percentage
  • Estimated completion time
  • Array health status
  • Device roles in the array

The yellow exclamation mark typically indicates a warning state. Investigate with:

dmesg | grep -i raid
journalctl -k | grep -i md

Common warning causes include:

  • Slow resync speeds
  • Potential disk issues
  • Metadata inconsistencies

To speed up the resync process, you can adjust the speed limits:

# View current limits
cat /proc/sys/dev/raid/speed_limit_min
cat /proc/sys/dev/raid/speed_limit_max

# Set higher limits (in KiB/sec)
echo 100000 > /proc/sys/dev/raid/speed_limit_min
echo 200000 > /proc/sys/dev/raid/speed_limit_max

Create a simple bash script to monitor progress:

#!/bin/bash
while true; do
  clear
  date
  echo ""
  cat /proc/mdstat
  echo ""
  mdadm --detail /dev/md0 | grep -E "State|Rebuild Status"
  sleep 30
done

Save as raidmonitor.sh and make executable:

chmod +x raidmonitor.sh
./raidmonitor.sh