Gentoo Archives: gentoo-user

From: Heiko Wundram <heiko@××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] md-device too small: where's my mistake?
Date: Thu, 23 Oct 2008 09:11:20
Message-Id: 200810231111.12539.heiko@xencon.net
In Reply to: [gentoo-user] md-device too small: where's my mistake? by "Stefan G. Weichinger"
1 Am Wednesday 22 October 2008 15:58:44 schrieb Stefan G. Weichinger:
2 > md2 is the one that gives me headaches. AFAI understand it should be
3 > about 3TB in size, but it is only 774 GB ....
4 >
5 > # fdisk -l /dev/md2
6 >
7 > Platte /dev/md2: 774.0 GByte, 774044975104 Byte
8 > 2 Köpfe, 4 Sektoren/Spuren, 188975824 Zylinder
9 > Einheiten = Zylinder von 8 × 512 = 4096 Bytes
10 > Disk identifier: 0x00000000
11 >
12 >
13 > Why?
14
15 You cannot manage disks >= ~2TB with fdisk (i.e., DOS partition tables), as
16 they (or rather the on-disk-structure of DOS partition tables) have an
17 inherent limitation in the maximum number of LBA48-blocks they can address.
18
19 I'd presume that because of this inherent limitation, fdisk is reporting the
20 wrong total size (2TB+774G+epsilon ~ 3TB; sounds like somewhere someone is
21 doing a modulo operation, possibly), and completely "off" values for
22 heads/sectors.
23
24 Anyway, md-devices cannot be partitioned anyway (of course you can write a
25 partition table on them, but the kernel won't use that to create md2-1,-2,
26 etc.), so using fdisk is wrong.
27
28 If you want to check the "real" size of the device, don't use fdisk, but
29 rather use
30
31 blockdev --getsize64 /dev/md2
32
33 which shows you the byte-count of the corresponding volume, and which I think
34 will be 3TB, as you want it to be.
35
36 If you want to subpartition large devices, use lvm(2), which does not have the
37 2TB limitation on size.
38
39 Hope this helps!
40
41 --
42 Heiko Wundram
43 hackerkey://v4sw7CHJLSUY$hw5ln5pr7FOP$ck2ma9u7FL$w3DVWXm0l7GL$i65e6t3EMRSXb7ADORen5a26s5MSr2p-6.62/-6.56g5AORZ

Replies

Subject Author
Re: [gentoo-user] md-device too small: where's my mistake? "Stefan G. Weichinger" <lists@×××××.at>