From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-user+bounces-47872-garchives=archives.gentoo.org@gentoo.org>) id 1G8wNM-0003oj-NP for garchives@archives.gentoo.org; Fri, 04 Aug 2006 09:53:53 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k749pFqm002795; Fri, 4 Aug 2006 09:51:15 GMT Received: from um1.unlimitedmail.net (139.Red-80-26-111.staticIP.rima-tde.net [80.26.111.139]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k749lJsa025218 for <gentoo-user@lists.gentoo.org>; Fri, 4 Aug 2006 09:47:19 GMT Received: from ppp.zz ([137.204.208.98]) (authenticated bits=0) by um1.unlimitedmail.net (8.13.7/8.13.4) with ESMTP id k749l9pn032465 for <gentoo-user@lists.gentoo.org>; Fri, 4 Aug 2006 11:47:10 +0200 From: Etaoin Shrdlu <shrdlu@unlimitedmail.org> To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] udev.rules: Two "removeable" SATA-hds...how to map to /dev ??? Date: Fri, 4 Aug 2006 12:10:26 +0200 User-Agent: KMail/1.9.1 References: <20060804.061459.74743590.Meino.Cramer@gmx.de> In-Reply-To: <20060804.061459.74743590.Meino.Cramer@gmx.de> Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608041210.26365.shrdlu@unlimitedmail.org> X-UnlimitedMail-MailScanner: Found to be clean X-UnlimitedMail-MailScanner-From: shrdlu@unlimitedmail.org X-Archives-Salt: e39e763a-21a1-48c9-ad56-b462530df811 X-Archives-Hash: c49a3cb66e589852ef342116278b58b9 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 root@bach ~]# 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