On Friday 4 August 2006 06:14, Meino Christian Cramer wrote: > But: How can I distinguish both harddiscs?
On one of my system, I run a raid 1 array with two identical disks (hde and hdg), and I have this (sorry for the line wraps): [Fri Aug 04 11:38:50 [EMAIL PROTECTED] ~]# ls -l /dev/disk/by-id/ [cut] lrwxrwxrwx 1 root root 9 Jul 20 10:50 ata-Maxtor_6Y080L0_Y2CG9M5E -> ../../hde lrwxrwxrwx 1 root root 9 Jul 20 10:50 ata-Maxtor_6Y080L0_Y3J1HW3E -> ../../hdg Those device names DO include the disk's serial number, and are (I suppose) created by udev. So, just plug in each of your identical drives and look at the devices which udev creates. Once you identify the exact names (probably under /dev/disk/by-id), use those names to distinguish between the drives wherever you need to. The strange thing is that udev obviously knows the serial number of each drive (udevinfo -q all -n /dev/sda *DOES* show the device's serial number), but it seems that no file under /sys contains this information (for hard disks, at least), so it looks like it's not possible to use a regular udev rule to create different devices (but, as I said above, seems that udev is somehow able to do that by itself - if somebody has more info please tell). I could probably be missing something here. -- gentoo-user@gentoo.org mailing list