2021-07-12 04:48:57

by Wenchao Hao

[permalink] [raw]
Subject: [bug report]scsi: drive letter drift problem

We deploy two SCSI disk in one SCSI host(virtio-scsi bus) for one
machine, whose ids are [0:0:0:0] and [0:0:1:0].

Mostly, the device letter are assigned as following after reboot:
[0:0:0:0] --> sda
[0:0:1:0] --> sdb

While in rare cases, the device letter shown as following:
[0:0:0:0] --> sdb
[0:0:1:0] --> sda

Could we guarantee "sda" is assigned to [0:0:0:0] and "sdb" is assigned
to [0:0:1:0] or not?
If we can, then how?


2021-07-12 09:35:50

by Stefan Hajnoczi

[permalink] [raw]
Subject: Re: [bug report]scsi: drive letter drift problem

On Mon, Jul 12, 2021 at 12:47:05PM +0800, Wenchao Hao wrote:
> We deploy two SCSI disk in one SCSI host(virtio-scsi bus) for one machine,
> whose ids are [0:0:0:0] and [0:0:1:0].
>
> Mostly, the device letter are assigned as following after reboot:
> [0:0:0:0] --> sda
> [0:0:1:0] --> sdb
>
> While in rare cases, the device letter shown as following:
> [0:0:0:0] --> sdb
> [0:0:1:0] --> sda
>
> Could we guarantee "sda" is assigned to [0:0:0:0] and "sdb" is assigned to
> [0:0:1:0] or not?
> If we can, then how?

Is there a stable ID that you can use in /dev/disk/by-*?

Stefan


Attachments:
(No filename) (602.00 B)
signature.asc (499.00 B)
Download all attachments

2021-07-13 01:28:40

by Wenchao Hao

[permalink] [raw]
Subject: Re: [bug report]scsi: drive letter drift problem

On 2021/7/12 17:34, Stefan Hajnoczi wrote:
> On Mon, Jul 12, 2021 at 12:47:05PM +0800, Wenchao Hao wrote:
>> We deploy two SCSI disk in one SCSI host(virtio-scsi bus) for one machine,
>> whose ids are [0:0:0:0] and [0:0:1:0].
>>
>> Mostly, the device letter are assigned as following after reboot:
>> [0:0:0:0] --> sda
>> [0:0:1:0] --> sdb
>>
>> While in rare cases, the device letter shown as following:
>> [0:0:0:0] --> sdb
>> [0:0:1:0] --> sda
>>
>> Could we guarantee "sda" is assigned to [0:0:0:0] and "sdb" is assigned to
>> [0:0:1:0] or not?
>> If we can, then how?
> Is there a stable ID that you can use in /dev/disk/by-*?
>
> Stefan

Thanks, we found /dev/disk/by-path may be helpful