linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Chris Francy <zoredache@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Array Size differences between mdadm --detail and --examine
Date: Tue, 20 Mar 2012 12:52:11 +1100	[thread overview]
Message-ID: <20120320125211.27ad32b9@notabene.brown> (raw)
In-Reply-To: <CAM8ZctUH--UJmKi56UJNmDss67uzQycLyx1tP0qeyB9GCFBc0g@mail.gmail.com>

[-- 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 --]

      reply	other threads:[~2012-03-20  1:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 23:04 Array Size differences between mdadm --detail and --examine Chris Francy
2012-03-20  1:52 ` NeilBrown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120320125211.27ad32b9@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=zoredache@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).