Control device labels in /dev

0

I have an HP xw8200 workstation running linux with two small, fast SCSI drives hooked up to the onboard LSI SCSI controller. The drives get labeled /dev/sda & /dev/sdb in /dev, respectively. I have a large SATA disk that I want to add to the system to store data, but every time I connect it, it's /dev gets assigned sda & the two scsi drives are assigned sdb,c, which messes with the boot procedure. How can I get this SATA drive to use sdc?

churnd

Posted 2011-03-22T10:24:27.967

Reputation: 4 228

2Why are you not using labels or UUIDs for boot? – Ignacio Vazquez-Abrams – 2011-03-22T10:32:12.637

I am using LVM & that is how fstab was generated. – churnd – 2011-03-22T10:50:23.707

1@churnd You can modify fstab to use UUID or labels, UUID=[uuid] and LABEL=[label] respectively. The UUID can be detected with blkid (run it as root). The label can be found with ls -l /dev/disk/by-label/ – Lekensteyn – 2011-12-03T13:13:21.490

Answers

0

You could attempt to use udev (that daemon that controls the /dev filesystem) to write some rules that change the /dev entry for the SATA, and then modify your fstab to accomidate this.

You can find out how to write a udev entry (the page mostly covers USB devices, but that and the man pages should help you get a good idea on how to do it) by following the link above.

HackADay might expand your knowledge on udev rules a little bit as well.

new123456

Posted 2011-03-22T10:24:27.967

Reputation: 3 707