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