Solved

drive showing wrong size

Posted on 2006-11-25
10
426 Views
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!

-----dmesg----------------
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
0
Comment
Question by:jmarkfoley
  • 5
  • 3
10 Comments
 
LVL 38

Expert Comment

by:wesly_chen
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.
0
 
LVL 1

Author Comment

by:jmarkfoley
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?
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 500 total points
ID: 18022865
It's the IDE controller chip limitation for 137GB IDE hard disk.
Check the link for this kind of limitation.
http://www.techspot.com/vb/all/windows/t-36678-Accessing-More-Than-137gb-On-Large-Hard-Disks-read.html

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.
0
 
LVL 1

Author Comment

by:jmarkfoley
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.

Thanks.

ps - I don't have dmidecode. Where can I get it?
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 38

Expert Comment

by:wesly_chen
ID: 18033907
Check this URL:
http://www.interfacebus.com/Design_Connector_IDE.html

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.
0
 
LVL 1

Author Comment

by:jmarkfoley
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.
0
 
LVL 38

Expert Comment

by:wesly_chen
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.
0
 
LVL 38

Expert Comment

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

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now