我在 VMware 中有两个相同的虚拟机服务器。我想以某种方式区分分配给这些虚拟机的磁盘(用于 LVM 的磁盘、用于数据库数据的磁盘……)。但由于某种原因,这些主机上的 H:C:T:L 地址不同。
[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
dmesg 的输出显示,第一台服务器驱动程序 ata_piix 在 vmw_pvscsi 之前加载。而在第二台服务器上则相反。
[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
互联网上有一些谣言称可启动设备始终位于 SCSI host0 上,但似乎不再属实了。