Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-25-2011, 03:57 PM   #1
Registered: Sep 2011
Posts: 33

Rep: Reputation: Disabled
New to mdadm. Can someone interpret my /proc/mdstat?


I have Ubuntu Server 11.04 running in Virtualbox on my Mac (this is so I can test setting up the server a thousand times before actually building a physical one).

In virtualbox, I have given the server:

8GB drive for the OS
3x4GB drives for a RAID 5 array.

after having run mdadm, I check it by looking at /proc/mdstat.

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid 5] [raid4] [raid10]
md0 : active raid5 sdd1[3] sdc1[1] sdb1[0]
      8383488 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
(Hopefully there are no typos above, I had to type it in by hand because copying is not currently working)
My concern is that sdd1 is marked as [3]. I have almost no understanding of mdadm (but I am actively trying to learn). This website would suggest that - if I am not using a spare - the highest number any drive should be exhibiting would be n-1 (where n is the number of drives in the array). In my case, that should be [2], no? But here is is showing [3].


mdadm --detail /dev/md0
gets me the following output:

        Version : 1.2
  Creation Time : Sun Sep 25 13:33:42 2011
     Raid Level : raid5
     Array Size : 8383488 (8.00 GiB 8.58 GB)
  Used Dev Size : 4191744 (4.00 GiB 4.29 GB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Sun Sep 25 13:47:16 2011
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : ubuntu:0  (local to host ubuntu)
           UUID : 8b7364ba:f9534103:4fd09587:d5c2659e
         Events : 18
Looking at this output I am mildly reassured because it shows 3 active devices and 0 spare devices. Can someone explain what I am supposed to glean from /proc/mdstat?

Old 09-25-2011, 04:32 PM   #2
Registered: Sep 2011
Posts: 33

Original Poster
Rep: Reputation: Disabled
Another quick question on the heels of this one:

I edited my fstab file to include md0, but on reboot it fails to mount. Looking in /dev shows that the array has been renamed to md127. If I edit my fstab to refer to md127, all is well.

How do I get it to stay md0 across reboots?


Last edited by bvz; 09-26-2011 at 10:49 PM. Reason: spelling
Old 09-28-2011, 11:39 PM   #3
Registered: Sep 2011
Posts: 33

Original Poster
Rep: Reputation: Disabled
Bump. Anyone have any ideas? I'm mostly interested in finding out why md0 becomes md127.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can only see one drive in /proc/mdstat hedron Slackware 3 09-05-2011 09:56 AM
cat /proc/mdstat - how to tell what volumes its resyncing rjo98 Linux - Server 2 04-29-2011 08:47 AM
/proc/mdstat shows [U_] for all sdb entries nanziameda Linux - Server 1 04-05-2011 03:29 AM
RAID 1 on openSuSE 10.3 yields "empty" /proc/mdstat marco.hahn Linux - Server 3 03-13-2008 11:34 PM
event 7 displayed in /proc/mdstat craigusb Linux - Software 0 07-05-2006 03:06 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration