共计 3753 个字符,预计需要花费 10 分钟才能阅读完成。
近来对 IDC 机房的服务器进行改造,为了提高 IDC 机房的服务器利用效率,决定采用 Vmware 虚拟化方案,在对服务器进行 VSphere 虚拟化迁移后发现业务服务器运行速度并没有在物理机上的时候的速度快,在网上找过相关的方案并咨询相关的技术人员,大家建议使用 SSD 硬盘做为 Esxi 的主机缓存方案。
自从 vSphere 5.0 发布后,VMware 明确表明新版本的 vSphere 支持使用 SSD 做主机缓存, 这样一来 vSphere 的主机速度会在之前的基础上大幅提升。
配置过程
下面将介绍安装和配置 SSD 硬盘为 vSphere 主机缓存的主要过程:
-
将 vSphere 进入维护模式, 然后远程将 vSphere 主机关机, 然后切断主机电源, 将 SSD 硬盘装到主机上, 然后开机;
-
通过 vSphere 连接到 Exsi 主机,点击然后切换到右面的“配置”选项卡中。点击“软件”一栏中的“主机缓存配置”,然后在界面中选择需要配置的 SSD 硬盘, 右键点击”属性“将“分配存储空间”前的复选框选中,然后确定这样就可以实现用 SSD 硬盘为 Exsi 主机应用加速。
问题处理
在添加 SSD 时,出现 Esxi 主机无法识别 SSD 硬盘,将 SSD 硬盘识别为普通的硬盘,以下是相关的处理过程:
(1). 登录到 Esxi 主机,打开 Esxi 命令行(Enable SSH)模式;
(2). 通过 SSH 客户端,登录到 Esxi 主机;
(3). 执行如下命令来查看 ESXi 5.x 识别到的设备列表,执行如下命令
# 查看 Esxi 主机中的设备列表
~ bash 4.3$ esxcli storage nmp device list
mpx.vmhba1:C0:T2:L0
Device Display Name: Local VMware Disk (mpx.vmhba1:C0:T2:L0)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba1:C0:T2:L0;current=vmhba1:C0:T2:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba1:C0:T2:L0
Is Local SAS Device: false
Is USB: false
Is Boot USB Device: false
mpx.vmhba1:C0:T1:L0
Device Display Name: Local VMware Disk (mpx.vmhba1:C0:T1:L0)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba1:C0:T1:L0;current=vmhba1:C0:T1:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba1:C0:T1:L0
Is Local SAS Device: false
Is USB: false
Is Boot USB Device: false
mpx.vmhba1:C0:T0:L0
Device Display Name: Local VMware Disk (mpx.vmhba1:C0:T0:L0)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba1:C0:T0:L0;current=vmhba1:C0:T0:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba1:C0:T0:L0
Is Local SAS Device: false
Is USB: false
Is Boot USB Device: false
mpx.vmhba32:C0:T0:L0
Device Display Name: Local NECVMWar CD-ROM (mpx.vmhba32:C0:T0:L0)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba32:C0:T0:L0;current=vmhba32:C0:T0:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba32:C0:T0:L0
Is Local SAS Device: false
Is USB: false
Is Boot USB Device: false
记录要修改的硬盘 VMW_SATP_XXXX 和 naa.xxxxxxxxxx 的值.
(4). 在需要将之配置为 SSD 盘的设备上,执行如下命令
~ bash 4.3$ esxcli storage nmp satp rule add -s VMW_SATP_LOCAL --device mpx.vmhba1:C0:T1:L0 --option="enable_ssd"
命令参数说明:
- s – The SATP for which a new rule will be added.
- d – Set the device when adding SATP claim rules.
- o – Set the option string when adding a SATP claim rule.
(5). 最后回收一下设备,执行如下命令:
~ bash 4.3$ esxcli storage core claiming reclaim -d mpx.vmhba1:C0:T1:L0
如果无法 claim 设备,可能是设备存在 unclaim 状态,可以通过以下命令对设备进行 unclaim 操作,操作后再重新加载 claim 规则:
# Unclaim Device
~ bash 4.3$ esxcli storage core claiming unclaim --type device -d mpx.vmhba1:C0:T1:L0
# Reload Claim Rules
~ bash 4.3$ esxcli storage core claimrule load
~ bash 4.3$ esxcli storage core claimrule run
若无法回收设备,请安全重启即可。
(6). 查看已设置的设备。
~ bash 4.3# esxcli storage core device list -d mpx.vmhba1:C0:T1:L0
mpx.vmhba1:C0:T1:L0
Display Name: Local VMware Disk (mpx.vmhba1:C0:T1:L0)
Has Settable Display Name: false
Size: 40960
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/mpx.vmhba1:C0:T1:L0
Vendor: VMware
Model: Virtual disk
Revision: 1.0
SCSI Level: 2
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: false
Is SSD: true
Is Offline: false
Is Perennially Reserved: false
Queue Full Sample Size: 0
Queue Full Threshold: 0
Thin Provisioning Status: unknown
Attached Filters:
VAAI Status: unsupported
Other UIDs: vml.0000000000766d686261313a313a30
Is Local SAS Device: false
Is USB: false
Is Boot USB Device: false
No of outstanding IOs with competing worlds: 32
本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-11/148402.htm