Wrong count of devices in /proc/mdstat after "want_replacement"

Started by Roman Mamedov on Sep 18, 2012 · 2 messages from 2 authors · Last reply Sep 18, 2012

open the first message on its own page

Message details and related content
Hello,

Summary:

After removing a disk via "want_replacement", disk count in /proc/mdstat is
wrong ("[5/4]", not "[5/5]" as it should be).

More details below:

----

# mdadm --add /dev/md0 /dev/sdb1 
mdadm: added /dev/sdb1

# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Wed May 25 00:07:38 2011
     Raid Level : raid5
     Array Size : 3907003136 (3726.01 GiB 4000.77 GB)
  Used Dev Size : 976750784 (931.50 GiB 1000.19 GB)
   Raid Devices : 5
  Total Devices : 6
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Tue Sep 18 01:01:38 2012
          State : active 
 Active Devices : 5
Working Devices : 6
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 64K

           Name : avdeb:0  (local to host avdeb)
           UUID : b99961fb:ed1f76c8:ec2dad31:6db45332
         Events : 14135

121 more lines

Message details and related content
On Tue, 18 Sep 2012 11:04:36 +0600 Roman Mamedov [off-list ref] wrote:
Hello,

Summary:

After removing a disk via "want_replacement", disk count in /proc/mdstat is
wrong ("[5/4]", not "[5/5]" as it should be).

More details below:

----

# mdadm --add /dev/md0 /dev/sdb1 
mdadm: added /dev/sdb1

# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Wed May 25 00:07:38 2011
     Raid Level : raid5
     Array Size : 3907003136 (3726.01 GiB 4000.77 GB)
  Used Dev Size : 976750784 (931.50 GiB 1000.19 GB)
   Raid Devices : 5
  Total Devices : 6
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Tue Sep 18 01:01:38 2012
          State : active 
 Active Devices : 5
Working Devices : 6
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 64K

           Name : avdeb:0  (local to host avdeb)
           UUID : b99961fb:ed1f76c8:ec2dad31:6db45332
         Events : 14135

112 more quoted lines


Thanks for the report.
I think that's fixed by:

http://git.neil.brown.name/?p=linux.git;a=commitdiff;h=413c4a33cb3cd1a14431c61fd20904cdb1867d17

which I will hopefully be sending to Linus some time soon.

NeilBrown
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help