Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] udev.rules: Two "removeable" SATA-hds...how to map to /dev ???
Date: Fri, 04 Aug 2006 17:36:14
Message-Id: 7573e9640608041028p1338da6dm639506224816fe84@mail.gmail.com
In Reply to: Re: [gentoo-user] udev.rules: Two "removeable" SATA-hds...how to map to /dev ??? by Etaoin Shrdlu
1 On 8/4/06, Etaoin Shrdlu <shrdlu@×××××××××××××.org> wrote:
2 > [Fri Aug 04 11:38:50 root@bach ~]# ls -l /dev/disk/by-id/
3 > [cut]
4 > lrwxrwxrwx 1 root root 9 Jul 20 10:50
5 > ata-Maxtor_6Y080L0_Y2CG9M5E -> ../../hde
6 > lrwxrwxrwx 1 root root 9 Jul 20 10:50
7 > ata-Maxtor_6Y080L0_Y3J1HW3E -> ../../hdg
8
9 ARGH! Thanks Etaoin, I forgot about the by-id mappings.
10
11 Meino, take a look at the by-id rules in 60-persistent-storage.rules.
12 It looks like you can use the ENV{ID_SERIAL} to match SATA drives by
13 serial.
14
15 > The strange thing is that udev obviously knows the serial number of each
16 > drive (udevinfo -q all -n /dev/sda *DOES* show the device's serial
17 > number), but it seems that no file under /sys contains this information
18
19 It uses the /lib/udev/scsi_id program to read the information directly
20 from the drive.
21
22 /lib/udev/scsi_id -g -s /block/sda -d /dev/sda
23
24 -Richard
25 --
26 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] udev.rules: Two "removeable" SATA-hds...how to map to /dev ??? Meino Christian Cramer <Meino.Cramer@×××.de>