26

I have two different computers with different RAID5 arrays. When I run the command

mdadm --detail /dev/md0

one drive reports "active" while the other reports "clean" for the "state" field. What is the difference? Should I worry about either state? Both seem to work fine.

Montag451
  • 151
  • 2
  • 8
Daniel
  • 1,167
  • 4
  • 13
  • 17

2 Answers2

24

From the RAID arrays documentation in the Linux kernel:

clean - no pending writes, but otherwise active.
    When written to inactive array, starts without resync
    If a write request arrives then
      if metadata is known, mark 'dirty' and switch to 'active'.
      if not known, block and switch to write-pending
    If written to an active array that has pending writes, then fails.
active
    fully active: IO and resync can be happening.
    When written to inactive array, starts with resync

So, no, you don't need to worry about either state; both are normal operation. If you saw inactive, that you'd have to worry about.

mdadm includes a raid monitor daemon that will alert you (via email by default) of any conditions you need to be aware of, in particular a failed disk. You should make sure it is configured & running.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
derobert
  • 107,579
  • 20
  • 231
  • 279
1

The metadevice (md0) should report clean and the physical disks (f.e. /dev/sda2 and /dev/sdb2 for a simple mirror) should be active sync. Then all is fine.

wolf
  • 486
  • 2
  • 6