Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

harddrive size miscalculated with df

  • 10-04-2005 1:18pm
    #1
    Moderators, Arts Moderators Posts: 35,741 Mod ✭✭✭✭


    I just added a new 200GB hard drive (slave), partitioned it into a 150GB and a 50GB. I started copying files from my old hard drive (80GB master) and after about 5 GB I got messages telling me I had no space left. Sure enough, when I type df -k . in the new 150GB partition, I get:
    Filesystem                   1K-blocks      Used Available Use% Mounted on
    /dev/ide/host0/bus0/target0/lun0/part1
                                          5542276   5260744         0 100% /
    

    When I open diskdrake everything seems OK, there are two ext3 partitions on hdb - 150GB and 50GB.

    Did I make too large a partition for the OS to understand? If so, what's the maximum I should make it? If not, what might be causing linux to misread the size?

    specs: Athlon 1.2GHz, 768MB RAM, Mandrake 10 Official, KDE 3.3.0, kernel 2.6.3-13mdk, nVidia GeForce FX5200, chaintech 7AJA2 mobo with onboard sound.


    [edit]Actually, it seems to be counting the size of the root partition (which had about 5GB left over and is now back to 75% full after I deleted the files I copied) as opposed to the size of the new harddrive mounted on /mnt/supersize. Strange.[/edit]


Comments

  • Moderators, Arts Moderators Posts: 35,741 Mod ✭✭✭✭pickarooney


    A reboot fixed it, whatever was wrong. Probably needed to reload fstab or something.


  • Moderators, Arts Moderators Posts: 35,741 Mod ✭✭✭✭pickarooney


    OTOH it seems to be wild slow. It's taken about 10 minutes to copy 5 Gigs from one partition to another (IDE, DMA enabled on both drives). Not too impressed.

    These results for hdparm don't make pretty reading
    [root@marklar /]# hdparm -tT /dev/hda
    /dev/hda:
     Timing buffer-cache reads:   300 MB in  2.02 seconds = 148.83 MB/sec
     Timing buffered disk reads:   44 MB in  3.01 seconds =  14.64 MB/sec
    [root@marklar /]# hdparm -tT /dev/hdb
    
    /dev/hdb:
     Timing buffer-cache reads:   292 MB in  2.02 seconds = 144.72 MB/sec
     Timing buffered disk reads:   48 MB in  3.01 seconds =  15.97 MB/sec
    

    I'm using 80-core cables, 8MB cache on each of the (7200rpm) drives, hda is master, hdb is slave. Any ideas?


  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    Try 'hdparm -i /dev/hdX' to see what UDMA mode you have autodetected onto. Judging by your speeds you're probably on udma2 (33 Mb/sec bus speed).

    This might sound like a stupid question to you but is the IDE cable in the right way around? If the wrong end is plugged into the motherboard you'd probably get reduced to udma2.

    Also check that UDMA is actually enabled with 'hdparm /dev/hdX'. If there is some issue/conflict with your particular chipset and the kernel DMA might not have enabled correctly leaving you on udma2 (strange considering that dma is disabled) at very slow speeds.

    BTW, the df was showing up wrong because the kernel was out of sync with partition table. If you use fdisk it normally gives a warning that you need to reboot if this happens.


  • Moderators, Arts Moderators Posts: 35,741 Mod ✭✭✭✭pickarooney


    Try 'hdparm -i /dev/hdX' to see what UDMA mode you have autodetected onto. Judging by your speeds you're probably on udma2 (33 Mb/sec bus speed)
    udma5 on both drives
    This might sound like a stupid question to you but is the IDE cable in the right way around? If the wrong end is plugged into the motherboard you'd probably get reduced to udma2.

    Not stupid at all, but I had the good sense to check with an IT guy at work before connecting them (I would have put them in wrong otherwise).
    Also check that UDMA is actually enabled with 'hdparm /dev/hdX'. If there is some issue/conflict with your particular chipset and the kernel DMA might not have enabled correctly leaving you on udma2 (strange considering that dma is disabled) at very slow speeds.

    using_dma = 1 on both
    BTW, the df was showing up wrong because the kernel was out of sync with partition table. If you use fdisk it normally gives a warning that you need to reboot if this happens.
    cheers :)

    I'm not going to worry about it I think, just plan my file distribution so I don't need to copy between drives very often.


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    How LONG is the cable? High-rate PATA setups tend to be very fussy about the cable length, which has to be quite short. Otherwise they just drop down.


  • Advertisement
  • Moderators, Arts Moderators Posts: 35,741 Mod ✭✭✭✭pickarooney


    About 50cm, normal length IDE I think.


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    About 50cm, normal length IDE I think.

    The official spec says you can have anything from 254mm to 457mm. However, longer cables are common, and will cause speed degradation.


Advertisement