Re: Array Size differences between mdadm --detail and --examine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 19 Mar 2012 16:04:34 -0700 Chris Francy <zoredache@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux