Bug#705454: mdadm: --examine --scan generates wrong #spares

Thorsten Glaser t.glaser at tarent.de
Mon May 6 07:22:42 UTC 2013


On Wed, 1 May 2013, NeilBrown wrote:

> "mdadm --examine --scan" looks at all devices, whether they are currently
> attached to an md array or not.  Maybe it found a device that looked like a
> spare but isn't currently know to md.

Doubtful…

> What does "mdadm --examine --scan -v" show?  It should list "dev=...." for
> each array.

This is totally wrong ;-)

tglase at tglase:~ $ sudo mdadm --examine --scan -v                                                           
ARRAY /dev/md0 level=raid1 num-devices=4 UUID=b4a6dcca:639ab49e:3cbfd189:3a086020
   spares=1   devices=/dev/sdb1,/dev/sde1,/dev/sdd1,/dev/sdc1,/dev/sda1
ARRAY /dev/md1 level=raid10 num-devices=4 UUID=b1518a63:e8fe3e9f:3cbfd189:3a086020
   spares=2   devices=/dev/sdb2,/dev/sdb,/dev/sde2,/dev/sde,/dev/sdd2,/dev/sdd,/dev/sdc2,/dev/sdc,/dev/sda2,/dev/sda

I have /dev/sd{a,b,c,d,e}1 and /dev/sd{a,b,c,d,e}2 respectively.

> Also you might be wanting 'mdadm --detail --scan' if you  already have the
> arrays assembled.

Sure, this one is now the system booted after the move.

tglase at tglase:~ $ sudo mdadm --detail --scan
ARRAY /dev/md0 metadata=0.90 spares=1 UUID=b4a6dcca:639ab49e:3cbfd189:3a086020
ARRAY /dev/md1 metadata=0.90 spares=1 UUID=b1518a63:e8fe3e9f:3cbfd189:3a086020

Does that help any?

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-314
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Sebastian Mancke



More information about the pkg-mdadm-devel mailing list