LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-27-2007, 04:28 PM   #1
cormander
Member
 
Registered: Dec 2004
Location: Hawaii
Distribution: Fedora & CentOS
Posts: 72

Rep: Reputation: 15
sda drive seen as hda on centos5


Hey all,

I've got two servers with pretty identical hardware, and they use a Serial ATA drive.

Both had fedora core 4 installed, and see the drive as /dev/sda*

Code:
brw-r-----  1 root disk 8, 0 Nov 29 03:14 /dev/sda
brw-r-----  1 root disk 8, 1 Nov 29 03:14 /dev/sda1
brw-r-----  1 root disk 8, 2 Nov 29 03:14 /dev/sda2
brw-r-----  1 root disk 8, 3 Nov 29 03:14 /dev/sda3
All is right with the world.

I reinstall one of them with CentOS 5, and the drive is seen as /dev/hda*

Code:
brw-r----- 1 root disk 3, 0 Dec 27 02:14 /dev/hda
brw-r----- 1 root disk 3, 1 Dec 27 02:14 /dev/hda1
brw-r----- 1 root disk 3, 2 Dec 27 02:14 /dev/hda2
brw-r----- 1 root disk 3, 3 Dec 27 02:14 /dev/hda3
Not only different names, but using different major # of the mknod. Can anyone tell me how to map the # to which kernel module? The /dev/sda's are 8, and the /dev/hda's are 3.

On top of that, and this is the painful part; the speed of the drive under CentOS 5 is very slow. I'm using hdparm to benchmark this:

On the fc4 box with /dev/sda

Code:
hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   4332 MB in  2.00 seconds = 2165.25 MB/sec
 Timing buffered disk reads:  176 MB in  3.03 seconds =  58.11 MB/sec
Nearly 60 MB/sec, what you would expect.

On the centos 5 server with /dev/hda (same hardware)

Code:
hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:   4416 MB in  2.00 seconds = 2208.28 MB/sec
 Timing buffered disk reads:   10 MB in  3.07 seconds =   3.26 MB/sec
Not even 4 MB/sec.

The kernel version on the FC4 machine: 2.6.11-1.1369_FC4smp
The kernel version on the CentOS 5 machine: 2.6.18-8.1.15.el5

(both are dual-cpu machines, the CentOS 5 kernel is a smp kernel, it just doesn't show it in the uname -r)

My thoughts are that this is a driver issue....

Here's my info into that with kudzu and lsmod:

FC4 server with /dev/sda

Code:
class: HD
bus: SCSI
detached: 0
device: sda
driver: ignore
desc: "Ata WDC WD2000JS-00M"
host: 0
id: 0
channel: 0
lun: 0
generic: sg0

class: IDE
bus: PCI
detached: 0
driver: ata_piix
desc: "Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controllers cc=IDE"
vendorId: 8086
deviceId: 27c0
subVendorId: 1458
subDeviceId: b002
pciType: 1
pcidom:    0
pcibus:  0
pcidev: 1f
pcifn:  2
CentOS 5 server with /dev/hda

Code:
class: HD
bus: IDE
detached: 0
device: hda
desc: "WDC WD1600JS-22NCB1"
physical: 16383/16/63
logical: 19457/255/63

class: IDE
bus: PCI
detached: 0
driver: ata_piix
desc: "Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE"
vendorId: 8086
deviceId: 27c0
subVendorId: 147b
subDeviceId: 107e
pciType: 1
pcidom:    0
pcibus:  0
pcidev: 1f
pcifn:  2
Nearly identical, they're the same kind of drive, except for the bus and desc are different...

Here are diffs on lsmod and the files in the lib directory of initrd:

Code:
lsmod:

 3c59x
 ac
+asus_acpi
 ata_piix
 battery
 button
-cryptoloop
+dm_mirror
 dm_mod
 ehci_hcd
 ext3
-hw_random
+floppy
 i2c_core
+i2c_ec
 i2c_i801
-ip_conntrack
-ip_tables
-ipt_state
-iptable_filter
-iptable_mangle
-iptable_nat
 ipv6
 jbd
 libata
-loop
-md5
+lp
 mii
+ohci_hcd
+parport
+parport_pc
+pcspkr
+sbs
 scsi_mod
 sd_mod
-serpent
+serio_raw
 snd
 snd_hda_codec
 snd_hda_intel


initrd:

 ata_piix.ko
+ehci-hcd.ko
 ext3.ko
 jbd.ko
 libata.ko
+ohci-hcd.ko
 scsi_mod.ko
 sd_mod.ko
+uhci-hcd.ko
The things staring with + exist on the CentOS 5 machine and not on the FC4 machine, and things starting with - exist on FC4 but not the CentOS 5 machine.

I've tried several different google searches and am not coming up with anyone else having this same problem.

Any ideas here?
 
Old 12-27-2007, 04:49 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 273Reputation: 273Reputation: 273
You might check the bios and see if it's set to legacy mode (i.e. making SATA's look like IDE). My motherboard was set like that when I first built the box.

Also, do you have mixed drives, i.e. some IDE and some SATA? My machine was doing the opposite (1 SATA HD, 1 IDE HD, 1 IDE DVD-RW) and making the IDE drives look like SATA. Then I added a second SATA and all of the sudden all the IDE drives were hda and hdb while the SATA's were sda and sdb.
 
Old 12-28-2007, 02:00 PM   #3
cormander
Member
 
Registered: Dec 2004
Location: Hawaii
Distribution: Fedora & CentOS
Posts: 72

Original Poster
Rep: Reputation: 15
Hi,

Haven't changed the bios (FC4 was seeing it as /dev/sda before the reinstall) and there's only one drive in it.

I did figure out a fix though; I added "hda=noprobe" to my /etc/grub.conf file on the kernel line and rebooted, that seems to have fixed the problem. Drive is now /dev/sda and the hdparm speed benchmark is back to normal.

Weird
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiles 2.6.23.9 kernel, sees drive as hda, reiserfs still thinks it's sda spiffytech Slackware 6 12-05-2007 08:01 AM
Install lilo on external drive (/dev/sda), then boot as INTERNAL (/dev/hda)? slackware-elf Slackware 3 08-18-2007 04:51 PM
SDA is Now HDA carlosinfl Linux - Hardware 6 06-05-2007 09:00 PM
/hda to /sda - help! dodgydodgy Linux - General 9 10-20-2006 06:07 PM
hda? sda? what do i have? nr5 Linux - Newbie 12 02-24-2005 06:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration