linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Bradley LaBoon <blaboon@linode.com>,
	linux-kernel@vger.kernel.org,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: SCSI device probing non-deterministic in 5.3
Date: Thu, 3 Oct 2019 14:19:37 -0700	[thread overview]
Message-ID: <f6d6622d-a9a0-d7de-b5af-b7a885ee1b61@infradead.org> (raw)
In-Reply-To: <d2ff27ce-67b0-735e-8652-0e925d5f756c@linode.com>

[add linux-scsi mailing list]

On 10/3/19 1:32 PM, Bradley LaBoon wrote:
> Hello, LKML!
> 
> Beginning with kernel 5.3 the order in which SCSI devices are probed and
> named has become non-deterministic. This is a result of a patch that was
> submitted to add asynchronous device probing (specifically, commit
> f049cf1a7b6737c75884247c3f6383ef104d255a). Previously, devices would
> always be probed in the order in which they exist on the bus, resulting
> in the first device being named 'sda', the second device 'sdb', and so on.
> 
> This is important in the case of mass VM deployments where many VMs are
> created from a single base image. Partition UUIDs cannot be used in the
> fstab of such an image because the UUIDs will be different for each VM
> and are not known in advance. Normally you can't rely on device names
> being consistent between boots, but with QEMU you can set the bus order
> of each block device and thus we currently use that to control the
> device order in the guest. With the introduction of the aforementioned
> patch this is no longer possible and the device ordering is different on
> every boot, resulting in the guest booting into an emergency shell
> unless the devices randomly happen to be loaded in the expected order.
> 
> I have created a patch which reverts back to the previous behavior, but
> I wanted to open this topic to discussion before posting it. I'm not
> totally familiar with the low-level details of SCSI device probing, so I
> don't know if the non-deterministic device order was the intended
> behavior of the patch or just a side-effect. If that is the intended
> behavior then is there perhaps some other way to ensure a consistent
> device ordering for a guest VM?
> 
> I am not subscribed to the list, so please CC me on any replies.
> 
> Thank you!
> Bradley LaBoon
> 


-- 
~Randy

  reply	other threads:[~2019-10-03 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 20:32 SCSI device probing non-deterministic in 5.3 Bradley LaBoon
2019-10-03 21:19 ` Randy Dunlap [this message]
2019-10-04 15:39   ` Bart Van Assche
2019-10-08 20:20     ` Bradley LaBoon

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=f6d6622d-a9a0-d7de-b5af-b7a885ee1b61@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=blaboon@linode.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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).