linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Array member "role numbers" in /proc/mdstat
@ 2013-09-23 16:21 Ian Pilcher
       [not found] ` <52406E0C.4080207@mpstor.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Pilcher @ 2013-09-23 16:21 UTC (permalink / raw)
  To: linux-raid

https://raid.wiki.kernel.org/index.php/Mdstat says that the number
shown in square brackets after each component device is the role number,
but this does not appear to be true (at least not always):

[root@c6 ~]# mdadm -C /dev/md0 -l 5 -n 3 -x 1 /dev/sd[bcde]
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

[root@c6 ~]# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sdd[4] sde[3](S) sdc[1] sdb[0]
      4191232 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

[root@c6 ~]# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Mon Sep 23 10:54:59 2013
     Raid Level : raid5
     Array Size : 4191232 (4.00 GiB 4.29 GB)
  Used Dev Size : 2095616 (2046.84 MiB 2145.91 MB)
   Raid Devices : 3
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Mon Sep 23 10:56:13 2013
          State : clean
 Active Devices : 3
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 512K

           Name : c6.penurio.us:0  (local to host c6.penurio.us)
           UUID : 17b42cb3:691ea02a:1d9822a1:6be0b398
         Events : 18

    Number   Major   Minor   RaidDevice State
       0       8       16        0      active sync   /dev/sdb
       1       8       32        1      active sync   /dev/sdc
       4       8       48        2      active sync   /dev/sdd

       3       8       64        -      spare   /dev/sde

Doc bug?

-- 
========================================================================
Ian Pilcher                                         arequipeno@gmail.com
Sometimes there's nothing left to do but crash and burn...or die trying.
========================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Array member "role numbers" in /proc/mdstat
       [not found] ` <52406E0C.4080207@mpstor.com>
@ 2013-09-23 16:39   ` Ian Pilcher
  2013-09-23 17:50     ` Phil Turmel
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Pilcher @ 2013-09-23 16:39 UTC (permalink / raw)
  To: Benjamin ESTRABAUD; +Cc: linux-raid

On 09/23/2013 11:36 AM, Benjamin ESTRABAUD wrote:
> Are you referring to the particular mention"Any device with "n" or
> higher are spare disks. 0,1,..,n-1 are for the working array." in the
> Mdstat wiki page?

I was really thinking of the sentence before that, which states:

  The raid role numbers [#] following each device indicate its role, or
  function, within the raid set.

-- 
========================================================================
Ian Pilcher                                         arequipeno@gmail.com
Sometimes there's nothing left to do but crash and burn...or die trying.
========================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Array member "role numbers" in /proc/mdstat
  2013-09-23 16:39   ` Ian Pilcher
@ 2013-09-23 17:50     ` Phil Turmel
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Turmel @ 2013-09-23 17:50 UTC (permalink / raw)
  To: Ian Pilcher; +Cc: Benjamin ESTRABAUD, linux-raid

On 09/23/2013 12:39 PM, Ian Pilcher wrote:
> On 09/23/2013 11:36 AM, Benjamin ESTRABAUD wrote:
>> Are you referring to the particular mention"Any device with "n" or
>> higher are spare disks. 0,1,..,n-1 are for the working array." in the
>> Mdstat wiki page?
> 
> I was really thinking of the sentence before that, which states:
> 
>   The raid role numbers [#] following each device indicate its role, or
>   function, within the raid set.

The wiki is wrong.  The number in brackets is the device's index into
the *table* of roles in the superblock.  In a new array, table entries
are allocated sequentially, which makes it *look* like the role numbers.

Phil

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-23 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23 16:21 Array member "role numbers" in /proc/mdstat Ian Pilcher
     [not found] ` <52406E0C.4080207@mpstor.com>
2013-09-23 16:39   ` Ian Pilcher
2013-09-23 17:50     ` Phil Turmel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).