LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how does harddrive gets its device label (https://www.linuxquestions.org/questions/linux-newbie-8/how-does-harddrive-gets-its-device-label-10003/)

kngharv 12-12-2001 11:14 PM

how does harddrive gets its device label
 
In the case of my old Pentium 120 system, I have a IDE system which consist of 3 harddrives:

Primary Master,
Primary Slave,
and
Secondary Slave.

and on my linux box, it assigned to
/dev/hda
/dev/hdb
/dev/hdd

How does Linux assign these device labels? based upon its IDE location?

If, let say, I remove my Primary Slave harddrive,

would my secondary slave HD still being labeled
/dev/hdd

?

This is very important for me cuz I will need to know how to edit /etc/fstab and /etc/lilo.conf after I remove one of the HD.

Same question on SCSI system. Does it uses SCSI ID on the SCSI chain as label?

Thanks in advance

taz.devil 12-13-2001 02:20 AM

Here is a thread that will help. Scroll down to Aussie's post. SCSI works the same but uses scd0, scd1 etc... I believe.

dorward 12-13-2001 02:44 AM

Re: how does harddrive gets its device label
 
Quote:

Originally posted by kngharv

How does Linux assign these device labels? based upon its IDE location?

Yes

hda - PM
hdb - PS
hdc - SM
hdd - SS

You can go higher with additional IDE devices (e.g. on a RAID controller)

Aussie 12-13-2001 03:05 AM

Device naming is coded into the kernel, for hard drives it goes the first drive on the first controler will be called "hda" and so on, partitions are numbered according to the drive they are on, "hda1, hda2" etc.. In windows the drives themselves are hidden and the partitions are called "drives" ie; "C" "D" etc. If you ever do a dual boot you can see all the partitions and drives in linux but in windows you can only see the partitions formatted for windows.


All times are GMT -5. The time now is 04:07 PM.