From: David Relson <relson@osagesoftware.com>
To: gentoo-user@lists.gentoo.org
Cc: sibok1981@gmail.com
Subject: Re: [gentoo-user] help with Persistent hard disk device names with udev
Date: Wed, 1 Sep 2010 07:31:02 -0400 [thread overview]
Message-ID: <20100901073102.3bc1a9a4@osage.osagesoftware.com> (raw)
In-Reply-To: <AANLkTimkk_TS4ASDc0u7ffiwCYQsLnk2=JMt7LF7R=0D@mail.gmail.com>
My udev rules use a combination of KERNEL, ATTRS(serial), and SYMLINK to
create named entries in /dev for my 2 USB hard drives.
With the following rules in /etc/udev/rules.d/10-local.rules:
KERNEL=="sd*", ATTRS{serial}=="FD...7264507", SYMLINK+="WD1"
KERNEL=="sd*", ATTRS{serial}=="FD...7285643", SYMLINK+="WD2"
Plugging them in results in /dev entries like:
brw-rw---- 1 root disk 8, 32 Aug 21 13:55 sdc
lrwxrwxrwx 1 root root 3 Aug 21 13:55 WD1 -> sdc
brw-rw---- 1 root disk 8, 32 Aug 21 13:55 sdd
lrwxrwxrwx 1 root root 3 Aug 21 13:55 WD2 -> sdd
And in /etc/fstab, I reference /dev/WD1 and /dev/WD2
HTH,
David
On Mon, 30 Aug 2010 15:00:28 +0200
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ódigo:
>
> SUBSYSTEM=="block", ATTR{serial}="VNVB05G2RKTRZH", NAME="hda"
> SUBSYSTEM=="block", ATTR{serial}="9QK0T4WM", NAME="sda"
> SUBSYSTEM=="block", ATTR{serial}="3QD0X58D", NAME="sdb"
> SUBSYSTEM=="block", ATTR{serial}="9QK0RS9G", NAME="sdc"
> SUBSYSTEM=="block", ATTR{serial}="9VP0SBVN", NAME="sdc"
>
> KERNEL=="hd*", SUBSYSTEM=="block", ATTR{serial}="VNVB05G2RKTRZH",
> NAME="hda%n" KERNEL=="sd*", SUBSYSTEM=="block",
> ATTR{serial}="9QK0T4WM", NAME="sda%n" KERNEL=="sd*",
> SUBSYSTEM=="block", ATTR{serial}="3QD0X58D", NAME="sdb%n"
> KERNEL=="sd*", SUBSYSTEM=="block", ATTR{serial}="9QK0RS9G",
> NAME="sdc%n" KERNEL=="sd*", SUBSYSTEM=="block",
> ATTR{serial}="9VP0SBVN", NAME="sdc%n"
>
>
> Should this work? Do some one know how can i get it to work? thanks
> in advanced
next prev parent reply other threads:[~2010-09-01 11:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 13:00 [gentoo-user] help with Persistent hard disk device names with udev Pau Peris
2010-08-30 13:32 ` J. Roeleveld
2010-08-30 14:17 ` Pau Peris
2010-08-31 12:58 ` Pau Peris
2010-08-31 13:08 ` Alex Schuster
2010-08-31 13:52 ` Dale
2010-08-31 19:33 ` Pau Peris
2010-09-01 13:37 ` Neil Bothwick
2010-09-01 11:31 ` David Relson [this message]
2010-10-09 11:58 ` Matthias Schwarzott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100901073102.3bc1a9a4@osage.osagesoftware.com \
--to=relson@osagesoftware.com \
--cc=gentoo-user@lists.gentoo.org \
--cc=sibok1981@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox