[ltp] scsi vs ata ?

Dmitry E. Mikhailov linux-thinkpad@linux-thinkpad.org
Thu, 19 Jun 2008 20:55:03 +0600


On Thursday 19 June 2008 07:45:31 pm Dan Sawyer wrote:
> All,
>
> Which is the more common mapping for hard drives in current
> distributions, hda or sda? I am trying to make ultra bay hot swap to
> work. Does it depend on an hda or sda mapping? Is it independent of hda
> versue sda?
>
> Thanks,
> Dan

Almost all current distributions use SCSI subsystem. To be more correct, they 
use SATA subsystem even for PATA disks, and SATA is SCSI subsystem.

So you'd get something like SDA.

With PATA subsystem, disks were named HDx, where 'x' is 'a' for primary 
master, 'b' for primary slave, 'c' for secondary master, 'd' for secondary 
slave.

With SCSI subsystem disks are enumerated one-by-one according to their place 
on the bus. If  we got initially 3 disks: 1st SCSI card - 1st  and 2nd disk 
and 2nd SCSI card, 1st disk: we got sda (1-1), sdb (1-2), sdc (2-1).

If disk 1-2 is removed, after reboot we got sda (1-1) and sdb (2-1).

So you'd better use EXT3 filesystem's labels.

[root@ibm ~]# cat /etc/fstab
LABEL=/                 /                       ext3    rw,noatime      1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0

[root@ibm ~]# e2label /dev/sda1
/boot

[root@ibm ~]# e2label
Usage: e2label device [newlabel]

	Best regards, Dmitry