From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Oq4z8-0005S9-0y for garchives@archives.gentoo.org; Mon, 30 Aug 2010 14:05:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E8EEE0B7F for ; Mon, 30 Aug 2010 14:05:17 +0000 (UTC) Received: from smtpq3.tb.mail.iss.as9143.net (smtpq3.tb.mail.iss.as9143.net [212.54.42.166]) by pigeon.gentoo.org (Postfix) with ESMTP id 4ED1FE0B6B for ; Mon, 30 Aug 2010 13:32:19 +0000 (UTC) Received: from [212.54.42.152] (helo=smtp20.tb.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1Oq4TC-0000W0-K6 for gentoo-user@lists.gentoo.org; Mon, 30 Aug 2010 15:32:18 +0200 Received: from 53532a97.cable.casema.nl ([83.83.42.151] helo=data.antarean.org) by smtp20.tb.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1Oq4T9-0006rH-OB for gentoo-user@lists.gentoo.org; Mon, 30 Aug 2010 15:32:15 +0200 Received: from localhost (localhost [127.0.0.1]) by data.antarean.org (Postfix) with ESMTP id 6949D9B0 for ; Mon, 30 Aug 2010 15:32:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at antarean.org Received: from data.antarean.org ([127.0.0.1]) by localhost (data.antarean.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6ZfypIAYmxPe for ; Mon, 30 Aug 2010 15:32:19 +0200 (CEST) Received: from eve.localnet (eve.lan.antarean.org [10.20.13.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by data.antarean.org (Postfix) with ESMTPS id 3511E4FE for ; Mon, 30 Aug 2010 15:32:19 +0200 (CEST) From: "J. Roeleveld" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] help with Persistent hard disk device names with udev Date: Mon, 30 Aug 2010 15:32:14 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.30-gentoo-r5; KDE/4.4.5; x86_64; ; ) References: In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201008301532.14402.joost@antarean.org> X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1Oq4T9-0006rH-OB X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: geen spam, SpamAssassin (niet cached, score=0.001, vereist 5, autolearn=not spam, BAYES_50 0.00) X-ZiggoSMTP-MailScanner-From: joost@antarean.org X-Spam-Status: No X-Archives-Salt: 73467c3c-3be8-4c43-a187-5245e52ba4d6 X-Archives-Hash: 65d27c8e984e2e143d80a8222df29950 On Monday 30 August 2010 15:00:28 Pau Peris wrote: > Hi, i would like to give persistent device names to the system hard > drives (just renaming its original device name to the one i want using > its serial number as identifier). I've created the following rules > which are not currently working. I'm trying to use device serial > numbers to properly set its device name. One of the main reasons for > doing that is i have a RAID composed by 3 disk (let's say sda sdc sdd) > and when i plug another 4 disks sda becomes sde, sdc becomes sdg and > so on while new drives take old device names, that's why i would like > to make it sure device names remains always the same. > Here are the rules > C=F3digo: >=20 > SUBSYSTEM=3D=3D"block", ATTR{serial}=3D"VNVB05G2RKTRZH", NAME=3D"hda" > SUBSYSTEM=3D=3D"block", ATTR{serial}=3D"9QK0T4WM", NAME=3D"sda" > SUBSYSTEM=3D=3D"block", ATTR{serial}=3D"3QD0X58D", NAME=3D"sdb" > SUBSYSTEM=3D=3D"block", ATTR{serial}=3D"9QK0RS9G", NAME=3D"sdc" > SUBSYSTEM=3D=3D"block", ATTR{serial}=3D"9VP0SBVN", NAME=3D"sdc" >=20 > KERNEL=3D=3D"hd*", SUBSYSTEM=3D=3D"block", ATTR{serial}=3D"VNVB05G2RKTRZH= ", > NAME=3D"hda%n" KERNEL=3D=3D"sd*", SUBSYSTEM=3D=3D"block", ATTR{serial}=3D= "9QK0T4WM", > NAME=3D"sda%n" KERNEL=3D=3D"sd*", SUBSYSTEM=3D=3D"block", ATTR{serial}=3D= "3QD0X58D", > NAME=3D"sdb%n" KERNEL=3D=3D"sd*", SUBSYSTEM=3D=3D"block", ATTR{serial}=3D= "9QK0RS9G", > NAME=3D"sdc%n" KERNEL=3D=3D"sd*", SUBSYSTEM=3D=3D"block", ATTR{serial}=3D= "9VP0SBVN", > NAME=3D"sdc%n" >=20 > Should this work? Do some one know how can i get it to work? thanks in > advanced Hi, You need to use double "=3D" for all the fields you want to match. In other words, for sda, you need to use: > SUBSYSTEM=3D=3D"block", ATTR{serial}=3D=3D"9QK0T4WM", NAME=3D"sda" instead of: > SUBSYSTEM=3D=3D"block", ATTR{serial}=3D"9QK0T4WM", NAME=3D"sda" Otherwise it doesn't match it correctly or will try to change the serial fo= r=20 the all the block-devices it finds. (I found this out when trying to rename my network-interfaces) =2D- Joost