LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New to mdadm. Can someone interpret my /proc/mdstat? (https://www.linuxquestions.org/questions/linux-newbie-8/new-to-mdadm-can-someone-interpret-my-proc-mdstat-904949/)

bvz 09-25-2011 03:57 PM

New to mdadm. Can someone interpret my /proc/mdstat?
 
Hi,

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.

Code:

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 http://unthought.net/Software-RAID.H...D.HOWTO-6.html 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].


typing:

Code:

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

Code:

/dev/md0:
        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?

Thanks
Ben

bvz 09-25-2011 04:32 PM

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?

Thanks
Ben

bvz 09-28-2011 11:39 PM

Bump. Anyone have any ideas? I'm mostly interested in finding out why md0 becomes md127.

Thanks.


All times are GMT -5. The time now is 07:12 PM.