linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Array Size differences between mdadm --detail and --examine
@ 2012-03-19 23:04 Chris Francy
  2012-03-20  1:52 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Francy @ 2012-03-19 23:04 UTC (permalink / raw)
  To: linux-raid

I am seeing a different array size with mdadm --detail and --examine,
and I don't understand why.

I have seen this on a production systems, but I created an array in a
VM for testing purposes, and I am seeing the same results.

I have a 5 device RAID10 with created like so.  It has 5 members 8GB
each.  Which I believe should result in an array size of ~20GB.

    mdadm -v --create  /dev/md0 --assume-clean \
       --level=raid10 --layout=o2 --raid-devices=5 \
       --chunk=64 \
       /dev/sdb2 /dev/sdc2 /dev/sdd2 /dev/sde2 /dev/sdf2

mdadm --detail reports an array size of ~20GiB

  root@debian:~# mdadm --detail /dev/md0
  /dev/md0:
    Creation Time : Fri Mar 16 16:06:09 2012
       Raid Level : raid10
       Array Size : 20960960 (19.99 GiB 21.46 GB)
    Used Dev Size : 8384384 (8.00 GiB 8.59 GB)

mdadm --examine reports an array size of ~16GiB

  root@debian:~# mdadm --examine /dev/sdb2  /dev/sdd2 /dev/sde2 /dev/sdf2
  /dev/sdb2:
   Avail Dev Size : 16769024 (8.00 GiB 8.59 GB)
       Array Size : 33537536 (15.99 GiB 17.17 GB)
    Used Dev Size : 16768768 (8.00 GiB 8.59 GB)

Most of my testing was done on a Debian squeeze system, but I manually
compiled and installed mdadm 3.2.3 and I also saw the same confusing
output from a Gentoo based livecd with a recent kernel.

The full output of the mdadm output is pasted available here.
http://paste.debian.net/160057/

The array in the VM seems to work fine, I was able to create a
filesystem and store data on it.  But the output from the --examine is
confusing.

The same is true with the use Dev size  `8384384 (8.00 GiB 8.59 GB)`
versus `16768768 (8.00 GiB 8.59 GB)`.

Chris Francy

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

* Re: Array Size differences between mdadm --detail and --examine
  2012-03-19 23:04 Array Size differences between mdadm --detail and --examine Chris Francy
@ 2012-03-20  1:52 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2012-03-20  1:52 UTC (permalink / raw)
  To: Chris Francy; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]

On Mon, 19 Mar 2012 16:04:34 -0700 Chris Francy <zoredache@gmail.com> wrote:

> I am seeing a different array size with mdadm --detail and --examine,
> and I don't understand why.
> 
> I have seen this on a production systems, but I created an array in a
> VM for testing purposes, and I am seeing the same results.
> 
> I have a 5 device RAID10 with created like so.  It has 5 members 8GB
> each.  Which I believe should result in an array size of ~20GB.
> 
>     mdadm -v --create  /dev/md0 --assume-clean \
>        --level=raid10 --layout=o2 --raid-devices=5 \
>        --chunk=64 \
>        /dev/sdb2 /dev/sdc2 /dev/sdd2 /dev/sde2 /dev/sdf2
> 
> mdadm --detail reports an array size of ~20GiB
> 
>   root@debian:~# mdadm --detail /dev/md0
>   /dev/md0:
>     Creation Time : Fri Mar 16 16:06:09 2012
>        Raid Level : raid10
>        Array Size : 20960960 (19.99 GiB 21.46 GB)
>     Used Dev Size : 8384384 (8.00 GiB 8.59 GB)
> 
> mdadm --examine reports an array size of ~16GiB
> 
>   root@debian:~# mdadm --examine /dev/sdb2  /dev/sdd2 /dev/sde2 /dev/sdf2
>   /dev/sdb2:
>    Avail Dev Size : 16769024 (8.00 GiB 8.59 GB)
>        Array Size : 33537536 (15.99 GiB 17.17 GB)
>     Used Dev Size : 16768768 (8.00 GiB 8.59 GB)

Thanks for the report.

There seems to be a rounding error in mdadm when calculating the size to
report for --examine.  The value for --detail is of course correct.

I'll try to get it fixed in the next release.

Thanks,
NeilBrown


> 
> Most of my testing was done on a Debian squeeze system, but I manually
> compiled and installed mdadm 3.2.3 and I also saw the same confusing
> output from a Gentoo based livecd with a recent kernel.
> 
> The full output of the mdadm output is pasted available here.
> http://paste.debian.net/160057/
> 
> The array in the VM seems to work fine, I was able to create a
> filesystem and store data on it.  But the output from the --examine is
> confusing.
> 
> The same is true with the use Dev size  `8384384 (8.00 GiB 8.59 GB)`
> versus `16768768 (8.00 GiB 8.59 GB)`.
> 
> Chris Francy
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

end of thread, other threads:[~2012-03-20  1:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 23:04 Array Size differences between mdadm --detail and --examine Chris Francy
2012-03-20  1:52 ` NeilBrown

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).