[PVE-User] Disk recognition order

Uwe Sauter uwe.sauter.de at gmail.com
Tue Aug 29 13:17:03 CEST 2017


Hi,

I'm currently facing the following problem:

VM is defined with several disks:
scsi0 -> ceph:vm-201-disk1,discard=on, size=16G
scsi1 -> ceph:vm-201-disk2,discard=on, size=16G
scsi2 -> ceph:vm-201-disk3,discard=on, size=4G
scsi3 -> ceph:vm-201-disk4,discard=on, size=4G
scsi4 -> ceph:vm-201-disk5,discard=on, size=4G
scsi5 -> ceph:vm-201-disk6,discard=on, size=4G

But disks are recognized in different order:

# lsscsi -s
[1:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+  /dev/sr0        -
[2:0:0:0]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sda   17.1GB          <-- scsi0: boot drive
[2:0:0:1]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sdf   17.1GB          <-- scsi1: recognized last as /dev/sdf
[2:0:0:2]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sde   4.29GB          <-- scsi2: recognized second to last as /dev/sde
[2:0:0:3]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sdd   4.29GB
[2:0:0:4]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sdc   4.29GB
[2:0:0:5]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sdb   4.29GB          <-- scsi5: recognized as /dev/sdb

# dmesg | grep Attached
[    1.644614] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    1.702276] sd 2:0:0:0: [sda] Attached SCSI disk
[    1.703816] sd 2:0:0:4: [sdc] Attached SCSI disk
[    1.703822] sd 2:0:0:3: [sdd] Attached SCSI disk
[    1.703861] sd 2:0:0:5: [sdb] Attached SCSI disk
[    1.704406] sd 2:0:0:2: [sde] Attached SCSI disk
[    1.706665] sd 2:0:0:1: [sdf] Attached SCSI disk
[    3.991816] sr 1:0:0:0: Attached scsi generic sg0 type 5
[    3.991994] sd 2:0:0:0: Attached scsi generic sg1 type 0
[    3.992034] sd 2:0:0:5: Attached scsi generic sg2 type 0
[    3.992062] sd 2:0:0:4: Attached scsi generic sg3 type 0
[    3.992101] sd 2:0:0:3: Attached scsi generic sg4 type 0
[    3.992963] sd 2:0:0:2: Attached scsi generic sg5 type 0
[    3.993009] sd 2:0:0:1: Attached scsi generic sg6 type 0



Is there any way to force scsi1 to /dev/sdb, scsi2 to /dev/sdc, etc. so that the order inside the VM is the same as in the
configuration?


Regards,

	Uwe



More information about the pve-user mailing list