From: Bradley LaBoon <blaboon@linode.com>
To: Bart Van Assche <bvanassche@acm.org>,
Randy Dunlap <rdunlap@infradead.org>,
linux-kernel@vger.kernel.org,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: SCSI device probing non-deterministic in 5.3
Date: Tue, 8 Oct 2019 16:20:04 -0400 [thread overview]
Message-ID: <66c09da4-1041-ff8d-713a-5f67b87d1672@linode.com> (raw)
In-Reply-To: <59eedd28-25d4-7899-7c3c-89fe7fdd4b43@acm.org>
On 10/4/19 11:39 AM, Bart Van Assche wrote:
> Have you already had a look at the /dev/disk/by-path directory? An
> example of the contents of that directory:
>
> $ (cd /dev/disk/by-path && ls -l | grep /s)
> lrwxrwxrwx 1 root root 9 Oct 3 16:49 pci-0000:00:02.0-ata-1 -> ../../sda
> lrwxrwxrwx 1 root root 9 Oct 3 16:49 pci-0000:00:08.0-scsi-0:0:0:1 ->
> ../../sr0
>
> Have you considered to use these soft links in /etc/fstab?
>
> In case using these links would be impractical: have you considered to
> add a udev rule that creates H:C:I:L soft links under a subdirectory of
> /dev, that makes these soft links point at the /dev/sd* device nodes and
> to use these soft links in /etc/fstab? That's probably a much more
> elegant solution than what has been proposed above.
>
> As one can see the information that is needed to implement such a udev
> rule is already available in sysfs:
>
> $ (cd /sys/class/scsi_device && ls -ld */device/block/*)
> drwxr-xr-x 9 root root 0 Oct 3 16:48 2:0:0:1/device/block/sr0
> drwxr-xr-x 9 root root 0 Oct 3 16:48 3:0:0:0/device/block/sda
>
> Bart.
Thanks for the reply! I wasn't aware that sysfs exposed the mapping that
way. That is very useful, and we should be able to utilize that.
Regards,
Bradley LaBoon
prev parent reply other threads:[~2019-10-08 20:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 20:32 Bradley LaBoon
2019-10-03 21:19 ` Randy Dunlap
2019-10-04 15:39 ` Bart Van Assche
2019-10-08 20:20 ` Bradley LaBoon [this message]
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=66c09da4-1041-ff8d-713a-5f67b87d1672@linode.com \
--to=blaboon@linode.com \
--cc=bvanassche@acm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rdunlap@infradead.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
all inboxes | Powered by JetHome®