Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 10 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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