LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   SATA drive detection with PCI controller (https://www.linuxquestions.org/questions/linux-hardware-18/sata-drive-detection-with-pci-controller-769145/)

ins_tech 11-14-2009 01:07 PM

SATA drive detection with PCI controller
 
Greetings all

I'm adding some new drives to a Samba server on a home network. The machine is a HP Vectra P3 running Slackware 12.2 with a 2.6.27.7 kernel. The OS resides on a IDE drive and the machine has an additional IDE drive for data storage.

The goal is to add additional storage. I installed a Rosewill PCI SATA controller and two Western Digital 1TB drives. One drive is mounted in the computer case and the other is external. The drives are model 10-EADS with no master slave jumper selection and the controller uses a SiI 3512 chipset.

For the SATA drives in my /etc/fstab I have

/dev/sda1 /mnt/storage ext3 defaults 1 2
/dev/sdb1 /mnt/backup ext3 defaults 1 2

And fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf1a454f1

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb1dcaf23

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux

All of this works fine but.....

The external drive is /dev/sda1 and the internal is /dev/sdb1. The preference is to have the internal drive be /dev/sda1 and the external be /dev/sdb1. So the question is how can the drive order be specified and or controlled. If for any reason if the machine reboots and the external drive is off the internal drive will now be /dev/sda1 which is going to cause confusion for any one trying to access the Samba share.

Thanks in advance

Pat

thorkelljarl 11-14-2009 02:16 PM

A guess...

From reading other past posts, I recall that the UUID number might be useful for this problem. The solution might be found in looking at GRUB for how the HDDs are identified. The HDDs registration in fstab might also be looked at for consistency of identification.

Google tells me that an alternative to the UUID is to give each HHD a unique label.

ins_tech 11-15-2009 11:40 AM

All I needed was a clue. The UUID was the way to go. Rather than use it in the boot loader (LILO in my case) I put in right in fstab.

UUID=a9b8e95b-c188-492a-b036-9b04bd4f844b /mnt/storage ext3 defaults 0 0
UUID=50070af1-0163-4042-ac8e-ade653382f7b /mnt/backup ext3 defaults 0 0

Which gives you

/dev/sdb1 on /mnt/storage type ext3 (rw)
/dev/sda1 on /mnt/backup type ext3 (rw)

That did the trick. Thanks

Pat


All times are GMT -5. The time now is 04:09 AM.