Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Suppose my computer have two SCSI cards and two SCSI HDs.
1st SCSI HD is on 1st SCSI card and 2nd SCSI HD is on 2nd SCSI card.
according to devices.txt :
(0-15) sda~sdp , major=8
(16-31) sdq~ sdaf , major=65
How 2nd SCSI HD on 2nd SCSI card should mount device file ?
Mount sdb or sdq ?
My idea is "sdq" mounted because different SCSI cards have
different major number which represents a driver.
Major number =8 controls HDs on first SCSI card and major number=65 controls HDs on second SCSI card.
Is My idea correct ?
Normally, common computer have two IDE controllers.
My IDE HD connects with 2nd IDE interface , but 1st IDE connects with
according to devices.txt :
22 block Second IDE hard disk/CD-ROM interface
0 = /dev/hdc Master: whole disk (or CD-ROM)
64 = /dev/hdd Slave: whole disk (or CD-ROM)
How IDE HD should mount device file ?
Mount hda or hdc ?
My HD is on 2nd IDE interface and I should mount "hdc" .
However , "hdc" represent third HD and I just have one HD,
so I should mount hda that represents first HD.
Should I mount hda or hdc ??
Thanks for everybod's reply.
IDE devices are named according to their interface (bus number,master/slave)
Primary Master = hda
Primary Slave = hdb
Secondary Master = hdc
Secondary Slave = hdd
... the same for hde,etc
You say your hd is master on the 2nd IDE bus, so the device will be hdc
It doesn't matter if it is your first or your second or whatever disk it is.
hda means Primary Master not first disk
SCSI devices named again according to their interface but there is a different way.
You have two disks. Lets suppose that one has 0,0,0 (ID 0 on the first controller) and the other has
1,0,0 (ID 0 on the second controller)
Then the 0,0,0 will be named sda and the 1,0,0 will be named sdb.
The change to major 65 has nothing to do with the naming.
The difference with IDE and SCSI device naming is that the IDE naming stays the same always, while the SCSI naming
isn't persistent (which causes trouble sometimes)
For example, if you connect another SCSI disk on the first controller and you give it ID 2 (so it becomes 0,0,2) then this
will become sdb and your 1,0,0 which was sdb will become sdc
Anyway, you can see which device each disk uses by running "dmesg" which prints the kernel messages.
Your explanation make me clear again.
Now,I have a question about IDE tape devices again and I never use tape devices,
so the question could be stupid .
According to devices.txt:
37 char IDE tape
0 = /dev/ht0 First IDE tape
1 = /dev/ht1 Second IDE tape
128 = /dev/nht0 First IDE tape, no rewind-on-close
129 = /dev/nht1 Second IDE tape, no rewind-on-close
Currently, only one IDE tape drive is supported.
Does it (...) mean 3rd IDE tape,4th IDE tape and so on ?
If it's true , the max number of IDE tape can get up to 128
becase of "127=/dev/ht127 128th IDE tape " ( I guess).
But IDE devices have no ID unlike SCSI devices, how does os determine the sequence
among tape devices ? Who is first or second or whatever ?
Is os's decision according to sequence of IDE controller(ide0,ide1...) and Master/Slave ?
If my question isn't clear ,please forgive me and ignore this question.
Probably by their position on the ide bus but your documentation plainly states that only one tape device is currently supported. You seem very confulsed about those numbers. Those are the major and minor numbers of the device. That's how the kernel actually communicates with the device. Those numbers are mapped to the device file for us humans; the kernel could care less how you name it as long as you create the device file with the right major and minor number. See the mknod command and man mknod. Naming conventions are important so other user space programs can communicate with the devices but it doesn't matter at the kernel level. All the kernel cares about are those numbers and whether the device is a block device or a character device. Those numbers tell the kernel where the device is on the various system busses and how to deal with the device.
To answer your question, ht0 is the first ide tape drive and has the major and minor numbers of 37 0. If you where to create this device by hand using mknod you would do:
# mknod /dev/ht0 c 37 0
The nht0 device refers to the same drive but the "n" refers to "no rewind". The fact that it has a minor number of 128 does not necessarilly indicate that there are 127 possible tape drives before it; there are often gaps in these sequences. In fact, if you look here: