1

I have two identical VM servers in VMware. I want to somehow distinguish assigned disk to these VMs (disks for LVM, for DB data, ...). But for some reason H:C:T:L addresses on these hosts differ.

[root@rhel7-rac-a-node-1]# lsscsi
[1:0:0:0]    disk    VMware   Virtual disk     2.0   /dev/sda
[1:0:1:0]    disk    VMware   Virtual disk     2.0   /dev/sdb
[3:0:0:0]    disk    VMware   Virtual disk     2.0   /dev/sdc
[3:0:1:0]    disk    VMware   Virtual disk     2.0   /dev/sdd
[3:0:2:0]    disk    VMware   Virtual disk     2.0   /dev/sde

[root@rhel7-rac-a-node-2]# lsscsi
[0:0:0:0]    disk    VMware   Virtual disk     2.0   /dev/sda
[0:0:1:0]    disk    VMware   Virtual disk     2.0   /dev/sdb
[1:0:0:0]    disk    VMware   Virtual disk     2.0   /dev/sdc
[1:0:1:0]    disk    VMware   Virtual disk     2.0   /dev/sdd
[1:0:2:0]    disk    VMware   Virtual disk     2.0   /dev/sde

Output from dmesg shows that on 1st server driver ata_piix was loaded before vmw_pvscsi. While on 2nd server it was vice-versa.

[root@rhel7-rac-a-node-1]# dmesg | grep -i -e libata -e pvscsi -e ata_piix
[    1.230391] libata version 3.00 loaded.
[    1.233959] ata_piix 0000:00:07.1: version 2.13
[    1.241146] VMware PVSCSI driver - version 1.0.7.0-k
[    1.254060] scsi host0: ata_piix
[    1.262946] scsi host1: VMware PVSCSI storage adapter rev 2, req/cmp/msg rings: 8/8/1 pages, cmd_per_lun=254
[    1.268604] scsi host2: ata_piix
[    1.285826] scsi host3: VMware PVSCSI storage adapter rev 2, req/cmp/msg rings: 8/8/1 pages, cmd_per_lun=254

[root@rhel7-rac-a-node-2]# dmesg | grep -i -e libata -e pvscsi -e ata_piix
[    1.120313] VMware PVSCSI driver - version 1.0.7.0-k
[    1.149768] scsi host0: VMware PVSCSI storage adapter rev 2, req/cmp/msg rings: 8/8/1 pages, cmd_per_lun=254
[    1.174869] scsi host1: VMware PVSCSI storage adapter rev 2, req/cmp/msg rings: 8/8/1 pages, cmd_per_lun=254
[    1.177702] libata version 3.00 loaded.
[    1.180621] ata_piix 0000:00:07.1: version 2.13
[    1.192439] scsi host2: ata_piix
[    1.199541] scsi host3: ata_piix
[ 2392.846873] ata_piix 0000:00:07.1: version 2.13
[ 2392.847207] scsi host5: ata_piix
[ 2392.847266] scsi host6: ata_piix

Some rumors on Internet say that bootable device is always on SCSI host0, but is does not seem to be true anymore.

3
  • I would recommend to use disk IDs instead of dynamic device names like /dev/sdX, e.g. /dev/disk/by-[path|id|uuid] and so on. Commented Jun 5, 2020 at 8:18
  • Those device names are persistent, they are even identical when same disk is shared between multiple servers. But it does not allow me to store any meta information. Mine idea was to distinguish between disks assigned to OS dg, app disk group and for DB data. Mine plan was to use disks on 2nd SCSI host adapter for DB data. But I can not create such an udev rule, when SCSI Host adapter number changes between reboots. Commented Jun 5, 2020 at 8:35
  • The two servers are identical now... but were they both created exactly the same way? It seems to me that the first one might be originally installed using ata_piix and then switched to use the PVSCSI driver, and the second node seems to be using PVSCSI from the start, and only loading ata_piixafterwards. Perhaps regenerating the initramfs file on the first node, expressly excluding the ata_piix driver from it, might make it behave the same as the second node? Commented Jun 5, 2020 at 9:25

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.