Skip to main content

vsphere硬件加速VAAI的实现

tgtd的支持情况

librbd支持的情况

从平台上面查询可以看到显示的受支持的

查询

[root@192:~] esxcli storage core device vaai status get
naa.60000000000000000e00000000010000
VAAI Plugin Name:
ATS Status: unsupported
Clone Status: unsupported
Zero Status: unsupported
Delete Status: unsupported

naa.60000000000000000e00000000010001
VAAI Plugin Name:
ATS Status: supported
Clone Status: unsupported
Zero Status: supported
Delete Status: unsupported
[root@192:~] esxcli storage core device list -d naa.60000000000000000e00000000010001|grep VAAI
VAAI Status: supported

查询支持情况

可以看到四项里面支持两项

krbd的支持情况

[root@192:~] esxcli storage core device vaai status get
naa.60000000000000000e00000000010000
VAAI Plugin Name:
ATS Status: unsupported
Clone Status: unsupported
Zero Status: unsupported
Delete Status: unsupported

naa.60000000000000000e00000000010001
VAAI Plugin Name:
ATS Status: supported
Clone Status: unsupported
Zero Status: supported
Delete Status: unsupported
[root@192:~] esxcli storage core device list -d naa.60000000000000000e00000000010001|grep VAAI
VAAI Status: supported

可以看到四项里面支持两项

krbd和librbd支持的情况一样

LIO的支持情况

[root@192:~] esxcli storage core device vaai status get
mpx.vmhba64:C0:T0:L0
VAAI Plugin Name:
ATS Status: unsupported
Clone Status: unsupported
Zero Status: unsupported
Delete Status: unsupported

naa.6001405c6758535437b4da58d6f20420
VAAI Plugin Name:
ATS Status: supported
Clone Status: supported
Zero Status: supported
Delete Status: unsupported
[root@192:~] esxcli storage core device list -d naa.6001405c6758535437b4da58d6f20420|grep VAAI
VAAI Status: supported

默认支持三项,有一项不支持

[root@lab103 ~]# targetcli /backstores/block/disk01/ get attribute emulate_3pc
emulate_3pc=1
[root@lab103 ~]# targetcli /backstores/block/disk01/ get attribute emulate_tpu
emulate_tpu=0
[root@lab103 ~]# targetcli /backstores/block/disk01/ get attribute emulate_caw
emulate_caw=1

VAAI相关的支持对应到上面的三个参数,默认开启了两个,有一个discard相关的默认关闭了

开启Delete Status支持

[root@lab103 ~]# targetcli /backstores/block/disk01/ set attribute emulate_tpu=1
Parameter emulate_tpu is now '1'.
[root@lab103 ~]# targetcli / saveconfig
Configuration saved to /etc/target/saveconfig.json

要断开iscsi再重连一下

[root@192:~] esxcli storage core device vaai status get
mpx.vmhba64:C0:T0:L0
VAAI Plugin Name:
ATS Status: unsupported
Clone Status: unsupported
Zero Status: unsupported
Delete Status: unsupported

naa.6001405c6758535437b4da58d6f20420
VAAI Plugin Name:
ATS Status: supported
Clone Status: supported
Zero Status: supported
Delete Status: supported
[root@192:~] esxcli storage core device list -d naa.6001405c6758535437b4da58d6f20420|grep VAAI
VAAI Status: supported

从上面的查询可以看到LIO能够做到所有的VAAI功能的全支持

SCST支持情况

blockio模式全支持

[root@192:~] esxcli storage core device vaai status get
eui.3237636464633731
VAAI Plugin Name:
ATS Status: supported
Clone Status: supported
Zero Status: supported
Delete Status: supported

mpx.vmhba64:C0:T0:L0
VAAI Plugin Name:
ATS Status: unsupported
Clone Status: unsupported
Zero Status: unsupported
Delete Status: unsupported

mpx.vmhba0:C0:T0:L0
VAAI Plugin Name:
ATS Status: unsupported
Clone Status: unsupported
Zero Status: unsupported
Delete Status: unsupported
[root@192:~] esxcli storage core device list -d eui.3237636464633731|grep VAAI
VAAI Status: supported

fileio模式不支持Delete Status

[root@192:~] esxcli storage core device vaai status get
eui.3237636464633731
VAAI Plugin Name:
ATS Status: supported
Clone Status: supported
Zero Status: supported
Delete Status: unsupported

简单的判断方法

linux连接iscsi磁盘,看盘是否支持discard 配置的fileio模式如下

[root@lab101 ~]# lsblk /dev/sdc  --discard
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sdc 0 0B 0B 0
└─testcipanpiaoyi 0 0B 0B 0

配置的block模式如下

[root@lab101 ~]# lsblk /dev/sdc  --discard
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sdc 0 512B 256M 1
└─testcipanpiaoyi 0 512B 256M 1

支持情况总结

VAAI功能tgtSCSTLIO
ATSYYY
CloneNYY
ZeroYYY
DeleteNY(default N)Y