From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Udev rule for external HD
Date: Mon, 01 Jun 2009 21:13:54 +0000 [thread overview]
Message-ID: <20090601211354.GA28544@kroah.com> (raw)
In-Reply-To: <1f8bbe3c0906011354h475b065u8eec1eed9619f3f7@mail.gmail.com>
On Tue, Jun 02, 2009 at 02:24:35AM +0530, unni krishnan wrote:
> Hello,
>
> I have written a udev rule to change the name of the external hard
> disk to /dev/external.
>
> SUBSYSTEM="block", SUBSYSTEMS="scsi", ATTRS{model}="ST3120827AS",
> NAME="external"
>
> The code is like the above. That works also. But the problem is that.
> without that rule my device creates 2 device nodes.
>
> 1. sdb for the drive
> 2. sdb1 for the one partition in it.
>
> The mount command without the rule will show that the device sdb1 is
> mounted on /media. But after adding that rule only one device node is
> created at /dev/external and there is no second device like I expected
> ( ie /dev/external1 ). Why it is like that ? Any idea ?
>
> Is there anything wrong in my udev rule ?
You shouldn't need it at all, just use the links in /dev/disk/ instead.
You can label your partition "external" and then mount
/dev/disk/by-label/external/ just fine.
good luck,
greg k-h
next prev parent reply other threads:[~2009-06-01 21:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 20:55 Udev rule for external HD unni krishnan
2009-06-01 21:13 ` Greg KH [this message]
2009-06-02 7:50 ` unni krishnan
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=20090601211354.GA28544@kroah.com \
--to=greg@kroah.com \
--cc=linux-hotplug@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).