LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-20-2009, 10:59 AM   #1
allele
Member
 
Registered: May 2009
Posts: 42

Rep: Reputation: 16
/dev/sda1 or /dev/hda1


What is the difference between /dev/sda1 and /dev/hda1? Do they usually both refer to the first partition on the first disk? If so, why are there two places for what seems to be the same thing?
 
Old 06-20-2009, 11:05 AM   #2
rsciw
Member
 
Registered: Jan 2009
Location: Essex (UK)
Distribution: Home: Debian/Ubuntu, Work: Ubuntu
Posts: 206

Rep: Reputation: 44
Think that depends on how your distro addresses them, might be drivers, not too sure.

My debian addresses my HD as /dev/sda
My centOS workstation addresses my HD as /dev/hda, while in the same time addressing my USB stick as /dev/sda.

In the case you're not sure what yours are addressed as, run in CLI

dmesg | grep sda
or
dmesg | grep hda

or just
dmesg

for full output
 
Old 06-20-2009, 11:26 AM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by allele View Post
What is the difference between /dev/sda1 and /dev/hda1? Do they usually both refer to the first partition on the first disk? If so, why are there two places for what seems to be the same thing?
In my case I have both. /dev/hda1 is my hard drive and /dev/sda1 is my usb 400GB external storage.
I thought sd... meant scsi but I guess I'm wrong.
cheers,
jdk
 
Old 06-20-2009, 11:32 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by jdkaye View Post
I thought sd... meant scsi but I guess I'm wrong
Correct. In the good ol' days before Serial ATA, hda was the first IDE disk, sda was the first SCSI disk. USB disks and many other interfaces today are addressed as SCSI disks from the kernel.
 
Old 06-20-2009, 11:41 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,932

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
It depends. For information what distribution / version and kernel are you running. /dev/hdx used to refer to PATA(IDE) drives and all drives that use the SCSI subsystem (SCSI, USB, Firewire, SATA) have a device ID of /dev/sdx. With kernels that are configured to use libata all drives now have a /dev/sdx device ID.
 
Old 06-20-2009, 12:47 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

'Persistent block device naming' will make things transparent.

The 'libATA FAQ' will aid you to understand things along with why to use persistent naming (above link).

It does depend on the level of kernel you happen to be using with the distribution. Most current distro support 'libATA'.

These links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
  


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
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 01:52 AM
Move /dev/hda2 to end of disk and grow /dev/hda1 bcg121 Linux - Software 4 11-09-2007 10:51 PM
Rsync from say /dev/hda1 to /dev/sda1 backup DIRdiver Linux - General 6 10-09-2006 07:42 PM
Grub Dual Boot /dev/sda1 /dev/hda1 jono268 Debian 4 01-14-2005 05:54 AM
USB Compact flash card reader hotplug creates /dev/sda but no /dev/sda1 -Mandrake 9.1 bibinono Linux - Hardware 2 08-11-2003 10:37 AM


All times are GMT -5. The time now is 12:43 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration