esxi两种方法查看硬盘健康状况

  Virtualization-虚拟化

系统自带命令esxcli


列出硬盘

esxcli storage core device list


查看硬盘smart信息

esxcli storage core device smart get -d

安装社区支持smartctl

  • 首先下载软件

http://pfoo.unscdf.org/esxi/smartctl-6.6-4433.x86_64.vib

  • 使用winscp上传到虚拟机
  • 设置允许社区软件
  • 安装软件
  • 使用smartctl命令

/opt/smartmontools/smartctl -d sat -a /vmfs/devices/disks/

其中硬盘名称可以用上面的方法得到

也可以全部使用ssh命令

cd /vmfs/volumes/datastore1
wget http://pfoo.unscdf.org/esxi/smartctl-6.6-4433.x86_64.vib
esxcli software acceptance set –level=CommunitySupported
esxcli software vib install -v /vmfs/volumes/datastore1/smartctl-6.6-4433.x86_64.vib

部分参考https://wiki.csnu.org/index.php/ESXi_smart_/_smartctl

单独测试某个硬盘命令:

/opt/smartmontools/smartctl -C -t short -d sat /vmfs/devices/disks/t10.ATA_____ST12000NM00072D2A1101________________________________ZJV1YB4T

smartctl简单用法:

smartctl -a <device> 说明:检查该设备是否已经打开SMART技术。

smartctl -s on <device> 说明:如果没有打开SMART技术,使用该命令打开SMART技术。

smartctl -t short <device> 说明:后台检测硬盘,消耗时间短;

smartctl -t long <device> 说明:后台检测硬盘,消耗时间长;

smartctl -C -t short <device> 说明:前台检测硬盘,消耗时间短;

smartctl -C -t long <device> 说明:前台检测硬盘,消耗时间长。其实就是利用硬盘SMART的自检程序。

smartctl -X <device> 说明:中断后台检测硬盘。

smartctl -l selftest <device> 说明:显示硬盘检测日志。

smartctl -l error <device> 说明:显示硬盘错误汇总。

LEAVE A COMMENT