我的虚拟堡垒服务器中有 8 个磁盘,它们的 PCI 地址以及控制它们的主机 ID 也在这里共享。但是lspci
列出了三个驱动控制器。是不是说其他两个根本不用,只SCSI Controller: LSI Logic
在这里用。为什么host0 and other hosts
只有host2
使用。
[root@linux_server ~]# fdisk -l | grep -i disk |grep -v identifer | grep -v identifier | grep -v mapper
Disk /dev/sda: 46.2 GB, 46170898432 bytes
Disk /dev/sdb: 8589 MB, 8589934592 bytes
Disk /dev/sdd: 21.5 GB, 21474836480 bytes
Disk /dev/sde: 53.7 GB, 53687091200 bytes
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
Disk /dev/sdf: 8589 MB, 8589934592 bytes
Disk /dev/sdg: 2147 MB, 2147483648 bytes
Disk /dev/sdh: 2147 MB, 2147483648 bytes
[root@linux_server ~]# ls -l /sys/block/sd*
lrwxrwxrwx 1 root root 0 Sep 2 06:39 /sys/block/sda -> ../devices/pci0000:00/0000:00:10.0/host2/target2:0:0/2:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Sep 2 06:39 /sys/block/sdb -> ../devices/pci0000:00/0000:00:10.0/host2/target2:0:1/2:0:1:0/block/sdb
lrwxrwxrwx 1 root root 0 Sep 2 06:39 /sys/block/sdc -> ../devices/pci0000:00/0000:00:10.0/host2/target2:0:2/2:0:2:0/block/sdc
lrwxrwxrwx 1 root root 0 Sep 2 06:39 /sys/block/sdd -> ../devices/pci0000:00/0000:00:10.0/host2/target2:0:3/2:0:3:0/block/sdd
lrwxrwxrwx 1 root root 0 Sep 2 06:39 /sys/block/sde -> ../devices/pci0000:00/0000:00:10.0/host2/target2:0:4/2:0:4:0/block/sde
lrwxrwxrwx 1 root root 0 Sep 2 06:39 /sys/block/sdf -> ../devices/pci0000:00/0000:00:10.0/host2/target2:0:5/2:0:5:0/block/sdf
lrwxrwxrwx 1 root root 0 Sep 2 06:39 /sys/block/sdg -> ../devices/pci0000:00/0000:00:10.0/host2/target2:0:6/2:0:6:0/block/sdg
lrwxrwxrwx 1 root root 0 Sep 2 06:39 /sys/block/sdh -> ../devices/pci0000:00/0000:00:10.0/host2/target2:0:8/2:0:8:0/block/sdh
[root@linux_server ~]# lspci | egrep -i "sata|scsi|ide"
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
02:04.0 SATA controller: VMware SATA AHCI controller
[root@linux_server ~]# cat /sys/class/scsi_host/host*/proc_name | wc -l
33
[root@linux_server ~]# ls -l /sys/class/scsi_host/host*
lrwxrwxrwx 1 root root 0 Sep 2 06:24 /sys/class/scsi_host/host0 -> ../../devices/pci0000:00/0000:00:07.1/host0/scsi_host/host0
lrwxrwxrwx 1 root root 0 Sep 2 06:24 /sys/class/scsi_host/host1 -> ../../devices/pci0000:00/0000:00:07.1/host1/scsi_host/host1
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host10 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host10/scsi_host/host10
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host11 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host11/scsi_host/host11
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host12 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host12/scsi_host/host12
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host13 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host13/scsi_host/host13
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host14 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host14/scsi_host/host14
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host15 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host15/scsi_host/host15
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host16 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host16/scsi_host/host16
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host17 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host17/scsi_host/host17
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host18 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host18/scsi_host/host18
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host19 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host19/scsi_host/host19
lrwxrwxrwx 1 root root 0 Sep 2 06:24 /sys/class/scsi_host/host2 -> ../../devices/pci0000:00/0000:00:10.0/host2/scsi_host/host2
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host20 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host20/scsi_host/host20
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host21 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host21/scsi_host/host21
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host22 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host22/scsi_host/host22
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host23 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host23/scsi_host/host23
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host24 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host24/scsi_host/host24
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host25 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host25/scsi_host/host25
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host26 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host26/scsi_host/host26
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host27 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host27/scsi_host/host27
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host28 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host28/scsi_host/host28
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host29 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host29/scsi_host/host29
lrwxrwxrwx 1 root root 0 Sep 2 06:24 /sys/class/scsi_host/host3 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host3/scsi_host/host3
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host30 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host30/scsi_host/host30
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host31 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host31/scsi_host/host31
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host32 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host32/scsi_host/host32
lrwxrwxrwx 1 root root 0 Sep 2 06:24 /sys/class/scsi_host/host4 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host4/scsi_host/host4
lrwxrwxrwx 1 root root 0 Sep 2 06:24 /sys/class/scsi_host/host5 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host5/scsi_host/host5
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host6 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host6/scsi_host/host6
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host7 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host7/scsi_host/host7
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host8 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host8/scsi_host/host8
lrwxrwxrwx 1 root root 0 Sep 2 06:27 /sys/class/scsi_host/host9 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:04.0/host9/scsi_host/host9
[root@linux_server ~]# for i in `ls /sys/class/scsi_host/`; do echo $i; cat /sys/class/scsi_host/$i/proc_name| grep -i mpt; done
host0
host1
host10
host11
host12
host13
host14
host15
host16
host17
host18
host19
host2
mptspi
host20
host21
host22
host23
host24
host25
host26
host27
host28
host29
host3
host30
host31
host32
host4
host5
host6
host7
host8
host9
host0
并且host1
来自这个:它支持 VMware 虚拟 CD/DVD 仿真。该控制器的物理版本有两个 IDE 通道,如果我没记错的话,VMware 最多允许同时使用两个虚拟 CD。
您的实际
/dev/sd*
磁盘设备目前似乎是 viahost2
,这是一个:那是 VMware 模拟一个简单的并行 SCSI 控制器,以实现最大的兼容性。
host3
...host32
与 相关VMware SATA AHCI controller
,这似乎没有通过它呈现的实际磁盘。除了消耗一些内存之外,这不应该是有害的;但是您可能会要求 VMware 主机管理员检查您的 VM 的配置,并从虚拟硬件配置中删除当前未使用的虚拟 SATA AHCI 控制器,除非不需要它。
也许主机管理员在之前的维护中断时尝试升级控制器类型,但不得不回滚更改,因为您的 VM 未配置为支持 VMware PVSCSI 或任何其他更现代的磁盘控制器类型。
为了获得最佳性能,PVSCSI 似乎是最佳选择,因为它消除了 VM 和主机之间的重复工作。
我在 vmware 上遇到了类似的问题,我根本没有连接任何 SCSI 设备,但是 linux 显示出令人难以置信的数量,例如
/dev/sdg
. 我的磁盘是 IDE,所以我想办法编辑并machine.vmx
从. 这解决了我的问题。scsi0.present = "TRUE"
"FALSE"