Saturday, May 14, 2016

S.M.A.R.T Readings in ESXi 6





So I’ve always been the paranoid type when it comes to hard drives after my first failure eons ago that left me in tears.  Since then I’ve got backups of backups of backups of backups and keep a hawk eye on the drives performance and health to help me know when its going bad before it actually does.  
Now in the ESXi web interface there isn’t much for S.M.A.R.T monitoring other than a quick notification that says “Normal”.  Not very informative.  Detailed in the VMware knowledge base (https://kb.vmware.com/kb/2040405) I noticed some quick commands you can run from SSH to view your drives S.M.A.R.T data.  Lets check that out below.



  1. Enable SSH on your ESXi box if it isn’t already.  You can do this through the web UI by going to “Manage” and selecting the top tab “Services”.  From here find the SSH service and click on it, then click “Actions” and change the policy to “Start and stop with host” and start the service.  This will ensure SSH will always be started on your host.



  1. Now open your favorite SSH client, such as PuTTY, and access your server.
  2. Once you have SSH’d into your server you will now run a quick command to identify the drives.  The output you will receive will be similar to below.  The command you will enter is:  esxcli storage core device list



  1. Once we have identified our drives we can then run the following command to get the S.M.A.R.T details.  The command you will enter is: esxcli storage core device smart get –d DEVICEID
  2. Now that device ID is a crazy long string, instead of typing it out simply highlight the portion of the device ID you want from the device listing we ran in step 3, then right click and PuTTY will automatically paste that line at the prompt.  Just get to the front of the line and enter your commands and you should get output such as below.



Hopefully this has helped you to gather some quick data from your disks.  As you can see from the screenshot each manufacturer will opt to show more or less data so each drives information will vary.  But from the Seagate drive I can see my drive temperature is at a healthy 29 degrees and error counts are not excessive.  

No comments:

Post a Comment