public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Heiko Wundram <heiko@xencon.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] md-device too small: where's my mistake?
Date: Thu, 23 Oct 2008 11:11:12 +0200	[thread overview]
Message-ID: <200810231111.12539.heiko@xencon.net> (raw)
In-Reply-To: <48FF3194.7020809@xunil.at>

Am Wednesday 22 October 2008 15:58:44 schrieb Stefan G. Weichinger:
> md2 is the one that gives me headaches. AFAI understand it should be
> about 3TB in size, but it is only 774 GB ....
>
> # fdisk -l /dev/md2
>
> Platte /dev/md2: 774.0 GByte, 774044975104 Byte
> 2 Köpfe, 4 Sektoren/Spuren, 188975824 Zylinder
> Einheiten = Zylinder von 8 × 512 = 4096 Bytes
> Disk identifier: 0x00000000
>
>
> Why?

You cannot manage disks >= ~2TB with fdisk (i.e., DOS partition tables), as 
they (or rather the on-disk-structure of DOS partition tables) have an 
inherent limitation in the maximum number of LBA48-blocks they can address.

I'd presume that because of this inherent limitation, fdisk is reporting the 
wrong total size (2TB+774G+epsilon ~ 3TB; sounds like somewhere someone is 
doing a modulo operation, possibly), and completely "off" values for 
heads/sectors.

Anyway, md-devices cannot be partitioned anyway (of course you can write a 
partition table on them, but the kernel won't use that to create md2-1,-2, 
etc.), so using fdisk is wrong.

If you want to check the "real" size of the device, don't use fdisk, but 
rather use

blockdev --getsize64 /dev/md2

which shows you the byte-count of the corresponding volume, and which I think 
will be 3TB, as you want it to be.

If you want to subpartition large devices, use lvm(2), which does not have the 
2TB limitation on size.

Hope this helps!

-- 
Heiko Wundram
hackerkey://v4sw7CHJLSUY$hw5ln5pr7FOP$ck2ma9u7FL$w3DVWXm0l7GL$i65e6t3EMRSXb7ADORen5a26s5MSr2p-6.62/-6.56g5AORZ



  parent reply	other threads:[~2008-10-23  9:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 13:58 [gentoo-user] md-device too small: where's my mistake? Stefan G. Weichinger
2008-10-23  7:42 ` Stefan G. Weichinger
2008-10-23  9:11 ` Heiko Wundram [this message]
2008-10-23  9:50   ` Stefan G. Weichinger

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=200810231111.12539.heiko@xencon.net \
    --to=heiko@xencon.net \
    --cc=gentoo-user@lists.gentoo.org \
    /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