lkml.org 
[lkml]   [1999]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: over 5Gb missing from a 13.5Gb disk
    In <19991205165958.A11724@mors.net> Wichert Akkerman (wichert@cistron.nl) wrote:

    > I'm having a problem with a new IBM IDE disk I just bought. It is
    > a 13.5Gb disk, but I can't access more then somewhat less then 8Gb
    > from it..

    You gave way not enough information to gave you wise answer (what version of
    kernel you are using, what motherboard, what version of hdparm, etc, etc).
    IBM-DJNA-371350 is just fine with Linux as it's what I'm using here right
    now :-) I'm using kernel 2.2.10ac10 BTW ...

    > This is what the kernel reports:

    > ide0: BM-DMA at 0x1440-0x1447, BIOS settings: hda:DMA, hdb:pio
    > hda: IBM-DJNA-371350, ATA DISK drive
    > hda: IBM-DJNA-371350, 12949MB w/1966kB Cache, CHS=40681/247/228, UDMA

    My kernel says:

    ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:pio, hdb:pio
    hda: IBM-DJNA-371350, ATA DISK drive
    hda: IBM-DJNA-371350, 12949MB w/1966kB Cache, CHS=1650/255/63, UDMA

    > hdparm seems to disagree with those numbers:

    > /dev/hda:

    > Model=IBM-DJNA-371350, FwRev=J76OA30K, SerialNo=GM0GM088910
    > Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
    > RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=34
    > BuffType=3(DualPortCache), BuffSize=1966kB, MaxMultSect=16, MultSect=off
    > DblWordIO=no, OldPIO=2, DMA=yes, OldDMA=2
    > CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=26520480
    > tDMA={min:120,rec:120}, DMA modes: mword0 mword1 mword2
    > IORDY=on/off, tPIO={min:240,w/IORDY:120}, PIO modes: mode3 mode4
    > UDMA modes: mode0 mode1 *mode2 mode3 mode4

    Here hdparm agree with kernel completely:

    /dev/hda:

    Model=IBM-DJNA-371350, FwRev=J76OA30K, SerialNo=GM0GMGL2059
    Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
    RawCHS=26310/16/63, TrkSize=0, SectSize=0, ECCbytes=34
    BuffType=3(DualPortCache), BuffSize=1966kB, MaxMultSect=16, MultSect=off
    DblWordIO=no, maxPIO=2(fast), DMA=yes, maxDMA=2(fast)
    CurCHS=1650/255/63, CurSects=26520480, LBA=yes
    LBA CHS=825/510/63 Remapping, LBA=yes, LBAsects=26520480
    tDMA={min:120,rec:120}, DMA modes: mword0 mword1 mword2
    IORDY=on/off, tPIO={min:240,w/IORDY:120}, PIO modes: mode3 mode4
    UDMA modes: mode0 mode1 *mode2

    BTW hdparm can not "disagree with kernel". It asks kernel and then shows
    you what kernel returned. If you see there wrong information that means
    that kernel later changed mind and now thinks that you have only 8BiG disk.

    > The cylinder/heads/sector count and the number of LAB sectors
    > corresponds to what is printed on the disk label. Since the kernel
    > gets the sizes wrong I have to enter them manually in fdisk.. no
    > big problem.

    No big problem you say ???? Are you joking, right ? If kernel thinks that
    there are just 8BiG it will use only 8BiG no matter what you'll do with
    fdisk ! Till reboot at least.

    > Now I create one big partition for the disk:

    > Disk /dev/hda: 16 heads, 63 sectors, 16383 cylinders
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    > Units = cylinders of 1008 * 512 bytes

    > Device Boot Start End Blocks Id System
    > /dev/hda1 1 16383 8257000+ 83 Linux

    Not know what you said fdisk but fdisk still thinks it's small (8GIB) disk.
    /dev/hda is only 8GiB in size (1008*512*16383=8455200768 bytes).

    Here is what my fdisk says:

    Disk /dev/ide/hd/c0b0t0u0: 255 heads, 63 sectors, 1650 cylinders
    Units = cylinders of 16065 * 512 bytes

    Device Boot Start End Blocks Id System
    /dev/ide/hd/c0b0t0u0p1 1 2 16033+ 11 Hidden FAT12
    /dev/ide/hd/c0b0t0u0p2 * 3 4 16065 1 FAT12
    /dev/ide/hd/c0b0t0u0p3 5 6 16065 11 Hidden FAT12
    /dev/ide/hd/c0b0t0u0p4 7 1650 13205430 5 Extended
    /dev/ide/hd/c0b0t0u0p5 7 8 16033+ 83 Linux
    /dev/ide/hd/c0b0t0u0p6 9 80 578308+ 6 FAT16
    /dev/ide/hd/c0b0t0u0p7 81 603 4200966 b Win95 FAT32
    /dev/ide/hd/c0b0t0u0p8 604 865 2104483+ b Win95 FAT32
    /dev/ide/hd/c0b0t0u0p9 866 1127 2104483+ 7 HPFS/NTFS
    /dev/ide/hd/c0b0t0u0p10 1128 1650 4200966 83 Linux

    /dev/ide/hd/c0b0t0u0 has 16065*512*1650=13571712000 bytes...

    > However the result partition is somewhat smaller than the expected 13Gb:

    Why you expecting 13BiG there ??? fdisk said you that you have partiton with
    /dev/hda1 with 8257000 blocks... 8257000 is only 8BiG, not 13 ...

    > /dev/hda1 7.8G 20k 7.4G 0% /mnt

    > It doesn't matter if I enable or disable LBA addressing in the BIOS..
    > the effects are exactly the same.

    Try to do the following:

    # dd if=/dev/zero of=/dev/hda bs=512 count=1

    Then reboot. This way you'll destroy partition table completely and kernel
    will not try to use it to determine size of disk. When kernel sees partition
    table on disk it thinks that correct information about disk is stored in that
    partition table and information supplied by BIOS is incorrect. It looks
    resonable (typical history: you put your disk in different system where
    BIOS has different idea about disk geometry; but as long as there are correct
    partiton table you can use your disk in that other system without problems)
    but in your case it prevents you from seeing all disk: fdisk will use the same
    information from partiton table to create new partitions. Even if you'll remove
    all partitions and try to "start from scratch" ! Since information at that
    point is already sucked from partition table to internal kernel structures
    it'll be there till reboot !




    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:55    [W:0.027 / U:60.312 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site