drive showing wrong size

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
Who is Participating?
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.
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.
jmarkfoleyAuthor Commented:
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?
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

jmarkfoleyAuthor Commented:
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?
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, 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.
jmarkfoleyAuthor Commented:
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.
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.
By the way, should be mode PIO 4 or UDMA mode 2(UDMA 33) for your CD-ROM in the BIOS.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.