1、背景
在做VSAN实验时,至少需要一块SSD磁盘,作为读/写缓存。如果没有SSD盘,我们需要将普通的HDD盘,标记为SSD磁盘。需要修改参数。
2、步骤
第一步:查找需要修改为SSD的磁盘的ID:如下标红即为磁盘的ID
[[email protected]:~] esxcli storage core device list
mpx.vmhba1:C0:T1:L0
Display Name:
Local VMware Disk (mpx.vmhba1:C0:T1:L0)
Has Settable
Display Name: false
Size: 20480
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: false
第二歩:创建一个SATP的规则,--option参数设置为enable_ssd,具体操作如下:
[[email protected]:~] esxcli storage nmp satp rule add --satp VMW_SATP_LOCAL --device mp
x.vmhba1:C0:T1:L0 --option "enable_local enable_ssd"
查看SATP规则配置成功
[[email protected]:~] esxcli storage nmp satp rule list | grep enable_ssd
VMW_SATP_LOCAL mpx.vmhba1:C0:T1:L0
enable_local enable_ssd user 第三步:reclaim重新申明磁盘,具体操作如下:
[[email protected]:~] esxcli storage core claiming reclaim -d mpx.vmhba1:C0:T1:L0
第四步:验证是否修改成功,In SSD:true,说明修改成功。重新扫描磁盘即可开始做VSAN实验了。
[[email protected]:~] 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 VVOL PE: false
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
备注:删除SATP规则:
[[email protected]:~] esxcli storage nmp
satp rule remove --satp VMW_SATP_LOCAL --device="mpx.vmhba1:C0:T1:L0"