21

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.

17

From Documentation/md.txt in the Linux kernel documentation:

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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.