drive showing wrong size

Posted on 2006-11-25
Medium Priority
Last Modified: 2013-12-15
I am running Linux 2.4.29, slackware installation. I've just removed a 120GB drive hdc and replaced it with a 160GB drive from another linux system. The wierd thing is, this system sees it as a 33.8GB drive. Why? Below is from my dmesg, below that is the fdisk on /dev/hdc and below that a df -m. Even though fdisk says 33.8G it shows /dev/hdc1 as 150GB! When I mount the partition, it also shows /dev/hdc1 as 150GB. I don't get it. What I want to do is delete the partition and repartition, but it will only let me partition 33.8GB, even though it recognizes 160GB.

Someone please explain!

hda: attached ide-disk driver.
hda: host protected area => 1
hda: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=14593/255/63, UDMA(33)
hdc: attached ide-disk driver.
hdc: host protected area => 1
hdc: setmax_ext LBA 312581808, native  66055248
hdc: 66055248 sectors (33820 MB) w/2048KiB Cache, CHS=4111/255/63, UDMA(33)

----fdisk /dev/hdc---------------------
Disk /dev/hdc: 33.8 GB, 33820286976 bytes
255 heads, 63 sectors/track, 4111 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1       19400   155830468+  83  Linux
/dev/hdc2           19401       19457      457852+  82  Linux swap

-----df -m----------------------
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda3                66646     19718     43488  32% /
/dev/hda1                   16         6         9  40% /boot
/dev/hda2                43995      9524     32237  23% /oracle/oradata
/dev/hdc1               149791    137185      4998  97% /mnt
Question by:jmarkfoley
  • 5
  • 3
LVL 38

Expert Comment

ID: 18017360
If your dmesg show only 33GB, then please check your BIOS setting for your hard disk.
Make sure your CHS number is right and BIOS detect the right volume of your hard disk.
Sometimes, you might need to upgrade your BIOS.

As root, run
# dmidecode
to see the hardware information such as hard disk information.

Author Comment

ID: 18021984
The BIOS is also showing 33.8G. This is a fairly new motherboard and it already has a 120G drive as hda, so it does recognize larger drives. I'm going to try moving the 160G back to the original machine and see what size it gives. Maybe the drive got zapped in the transfer between machines?! Can you think of any other possibilities?
LVL 38

Accepted Solution

wesly_chen earned 2000 total points
ID: 18022865
It's the IDE controller chip limitation for 137GB IDE hard disk.
Check the link for this kind of limitation.

The Linux kernel after 2.4.18 or above supports the IDE hard disk more than 137GB.

From dmesg message, it looks like your IDE controller on the motherboard is UDMA 33? Did you use the right IDE cable,  the BIOS setting (UDMA 3, 4, or 5) incorrect or BIOS does support it?

My personal experience is that upgrade the BIOS and OS as well as make sure using the 80pin UDMA IDE (66/100/133) bus cable solve the problem.

Since your BIOS also only see 33GB, then check your motherboard BIOS from the vendor website first.
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.


Author Comment

ID: 18033411
Good info, thanks. I have kernel 2.4.29, so it should recognize the +137GB drive, right?

I will check the IDE cable. I think it is one that came with the computer, but I'm not sure.

I don't know what you mean by BIOS setting UDMA 3,4,5 - could you explain this a bit further?

My current /dev/hda drive is 120GB. Are you suggesting that my cable/bios/whatever could handle that and up to 137GB, but might choke on >137GB drives? Hmmm. Interesting. Please comment.

The problem machine is a relatively new (2005) 800mhz Pentium III. I originally mkfs'd this drive in an ancient <300mhz Pentium II HP Presario that is at least 4-5 years old. It worked fine in that one and could see the whole drive. I'm inclined to think it might be the cable. /dev/hda is on a different cable (obviously). I cannot take this machine down until Saturday, so I'll give some more feedback then.


ps - I don't have dmidecode. Where can I get it?
LVL 38

Expert Comment

ID: 18033907
Check this URL:

BIOS ===> IDE speed
UDMA3 ==> UDMA33
UDMA4 ==> UDMA66
UDMA5 ==> UDMA100
UDMA6 ==> UDMA133
For UDMA66/100/133 IDE bus, you need 80pin bus cable. If you use 40pin bus calbe, then you only get UDMA33 speed.

> I have kernel 2.4.29, so it should recognize the +137GB drive
According to kernel.org, yes.

> 800mhz Pentium III
This is not latest or new CPU, it is at least 4 years old or more (in US).
Please check your motherboard model number (post here) and version number and see you can download the latest version of BIOS.

Author Comment

ID: 18299807
Sorry, I thought I took care of this question.

The solution was that my drive just wouldn't cooperate on the same controller as my CD rom drive. It didn't matter which I made a slave or master. When I moved things around to having both my CD on hdb and my 160GB by itself on hdc the system could see the whole of my 160GB drive.

here's my config as shown by dmesg:

hda: WDC WD1200JB-00GVA0, ATA DISK drive
hdb: Compaq CRD-8322B, ATAPI CD/DVD-ROM drive
hdc: SAMSUNG SP1604N, ATA DISK drive

Perhaps there is a conflict with Compaq and Samsung on the same controller.
LVL 38

Expert Comment

ID: 18303306
Well, it tells that your CD-ROM fast speed is UDMA33 (or PIO mode2).
When you connect your hard disk and CD-ROM on the same bus/cable, the slowest one will drag the faster one.
So your hard disk becomes UDMA33 with CO-ROM connected with the same cable.

Usually, the hard drive and the CD-ROM are connected to different IDE channel/bus to avoid the performance decrease by slowest one.
Thanks for sharing your solution.
LVL 38

Expert Comment

ID: 18303316
By the way, should be mode PIO 4 or UDMA mode 2(UDMA 33) for your CD-ROM in the BIOS.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Can you run Linux on a Windows system?  Yep.  Here's how.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question