Jump to content

How To: Get SMART data passed on from ESXI 5.1 Host


Val3ntin

Recommended Posts

Based on the feedback from the community, here is how to get your ESXi Host to pass on SMART data for Scanner in your guest VMs.

 

All you need to do is the following and then any disk (not USB) you plugin in thereafter will be available for RDM:

  1. In the ESXi Console window, highlight your server
  2. Go to the Configuration tab
  3. Under Software, click Advanced Settings
  4. Click RdmFilter
  5. Uncheck the box for RdmFilter.HbaIsShared
  6. Click OK

 

 

Used the Advanced Settings for StableBit Scanner to enable "UnsafeDirectIo" to get the SMART data from the virtual controller:

http://wiki.covecube.com/StableBit_Scanner_Advanced_Settings

And make sure that "UnsafeDirectIo" is set to "True", and reboot.

*Note: UnsafeDirectIo is "unsafe" for a reason. It is possible that it can cause issues or glitches, or in extremely rare conditions it can cause BSODs. In a large majority of cases, these issues don't occur, but it is a possibility. So definitely "at your own risk".

 

 

 

Original Post:


Hi Guys,

I have a Dell Precision T3500 Workstation, that are running VMware ESXi 5.1.0. On this host i have created 2 virtual machines, both are Windows 2012 server standard. One of these are running Stablebit Scanner v. 2.4.0.2928.

 

My problem is, that it does not show SMART status, temperatures or anything for any of my drives. This i all the data i get (se picture). Is there something i need to install on my ESXi host, or is this just not possible on my setup, because i use VMware?

fig1_1.png

 

This i what i have on the host server:
fig1_2.png

 

Thank you in advance..
 

Edited by drashna
To make information easier to find
Link to comment
Share on other sites

Unfortunately, you won't be able to get SMART data.

The issue is that ESXi (and HyperV even) use a virtual drive (even for the passed through disks) and this driver doesn't collect and pass one the SMART data.  

Also, since ESXi is based on *NIX, it means there isn't anything we can really do.

If you were using HyperV, you could install StableBit Scanner on that, but you'd want to disable file system and surface scans for any disks passed through.

 

I know that's not what you want to hear, Sorry.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Val3ntin,

 

It is feasible, as it works for me.  I have WSE2012 in ESXi 5.1.

 

1. Link your physical disks to ESXi using the RDM technique described in this blog (http://blog.davidwarburton.net/2010/10/25/rdm-mapping-of-local-sata-storage-for-esxi/)

2. In file "C:\Program Files (x86)\StableBit\Scanner\Service\Scanner.Service.exe.config", change setting "UnsafeDirectIo" to "True" - don't forget to reboot !

 

 

Good luck.

Link to comment
Share on other sites

Thanks!  I was not aware of this setting.  By the way, you don't have to go through all that for RDM anymore.  All you need to do is the following and then any disk (not USB) you plugin in thereafter will be available for RDM:

  1. In the ESXi Console window, highlight your server
  2. Go to the Configuration tab
  3. Under Software, click Advanced Settings
  4. Click RdmFilter
  5. Uncheck the box for RdmFilter.HbaIsShared
  6. Click OK

Hi Val3ntin,

 

It is feasible, as it works for me.  I have WSE2012 in ESXi 5.1.

 

1. Link your physical disks to ESXi using the RDM technique described in this blog (http://blog.davidwarburton.net/2010/10/25/rdm-mapping-of-local-sata-storage-for-esxi/)

2. In file "C:\Program Files (x86)\StableBit\Scanner\Service\Scanner.Service.exe.config", change setting "UnsafeDirectIo" to "True" - don't forget to reboot !

 

 

Good luck.

Link to comment
Share on other sites

Hey drashna,

 

The process in post #7 (the new way to enable RDM capability) is done instead of following the link in post #5 (the old way you had to enable RDM before ESXi 5.x).  So, the whole guide is literally post #7 plus UnsafeDirectIo for newer ESXi versions.  There is no reason not to run a version that supports this since ESXi has the free license available.  Thanks and keep up the great work!

 

Unless anyone objects, I'm going to pin this thread, rename it and edit the first post, so anyone else using ESXi can easily find this. 

Thanks guys for the input and feedback!!

Link to comment
Share on other sites

Yep, looks good!  Thanks!  I used to use the first iteration of Hyper-V but not with DrivePool or Scanner.  I remember that you had to set a disk to Offline in Disk Management before you could pass it through to a VM, but I am not sure if that is still the case in Hyper-V 2012.

 

Thanks.  The first post look better now?

 

 

To be honest, I'm more of a Hyper-V guy, so I'm not as familiar with ESXi as I would like to be.

Link to comment
Share on other sites

Maybe that data, along with this post, should be used to make another How-To sticky for SMART data in Hyper-V.

 

That's still the case.  Which is fine by me. There is a "trick" to get the OS to set all new disks as "offline" by default. I "borrowed" it from the Windows To Go setup guide:

http://social.technet.microsoft.com/wiki/contents/articles/6991.windows-to-go-step-by-step.aspx

Link to comment
Share on other sites

Well, you can't pass on SMART data on Hyper V (well, unless alex wants to figure out how to hack the pass through drivers to do so....), but you can install a second licensed copy (at a discount at least) on the HyperV host. If it's 2012 Core, this should work as well too (as it has the right version of .NET framework).

 

But I've put up and pinned the instructions. :)

Link to comment
Share on other sites

  • 5 months later...

hi,

 

My issue:

 

I am trying to get SMART data for my hard drives (SAS and SSD) with esxcli command " esxcli storage core device SMART -d <device name>"

 

when i try to query this command from my ESXi 5.1 host (installed on my server SSH to this host and ran this command), it gives all N/A (attached image). what should i exactly enable or disable and where, to get this command work with esxcli command?

 

 since i am very new with SMART, Vmware and Hard drive stuff, i cannot get my task work right, even though this post has more information, i am missing something.

 

can some please be more specific. thanks in advance!

 

post-1480-0-30353500-1392667131_thumb.png

Link to comment
Share on other sites

@aron, this article covers how to get SMART data in Stablebit Scanner running in a Windows VM with RDM disks on an ESXi host.  The following is the KB article from VMware about how to query SMART data from your drives from the ESXi host CLI: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2040405

 

You will also need to make sure that passing of SMART data is supported on your particular controller.  Here is an example from my host:

~ # esxcli storage core device smart get -d naa.5e83a97f147d02bc
Parameter                     Value  Threshold  Worst
----------------------------  -----  ---------  -----
Health Status                 OK     N/A        N/A
Media Wearout Indicator       0      0          0
Write Error Count             N/A    N/A        N/A
Read Error Count              117    50         100
Power-on Hours                100    0          100
Power Cycle Count             100    0          100
Reallocated Sector Count      100    3          100
Raw Read Error Rate           117    50         100
Drive Temperature             30     0          30
Driver Rated Max Temperature  N/A    N/A        N/A
Write Sectors TOT Count       N/A    N/A        N/A
Read Sectors TOT Count        N/A    N/A        N/A
Initial Bad Block Count       N/A    N/A        N/A
Link to comment
Share on other sites

 

@aron, this article covers how to get SMART data in Stablebit Scanner running in a Windows VM with RDM disks on an ESXi host.  The following is the KB article from VMware about how to query SMART data from your drives from the ESXi host CLI: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2040405

 

You will also need to make sure that passing of SMART data is supported on your particular controller.  Here is an example from my host:

~ # esxcli storage core device smart get -d naa.5e83a97f147d02bc
Parameter                     Value  Threshold  Worst
----------------------------  -----  ---------  -----
Health Status                 OK     N/A        N/A
Media Wearout Indicator       0      0          0
Write Error Count             N/A    N/A        N/A
Read Error Count              117    50         100
Power-on Hours                100    0          100
Power Cycle Count             100    0          100
Reallocated Sector Count      100    3          100
Raw Read Error Rate           117    50         100
Drive Temperature             30     0          30
Driver Rated Max Temperature  N/A    N/A        N/A
Write Sectors TOT Count       N/A    N/A        N/A
Read Sectors TOT Count        N/A    N/A        N/A
Initial Bad Block Count       N/A    N/A        N/A

thanks for the reply.

 

I'm using 2008M-8i card and also 9271-8i RAID controller(i guess these both controllers are capable of getting SMART details), on both the servers i have esxi5.1 installed,  for some reason i don't get smart details in any server.

 

do i need to enable something in BIOS or in vsphere to get this command display all the details?

Link to comment
Share on other sites

thanks for the reply.

 

I'm using 2008M-8i card and also 9271-8i RAID controller(i guess these both controllers are capable of getting SMART details), on both the servers i have esxi5.1 installed,  for some reason i don't get smart details in any server.

 

do i need to enable something in BIOS or in vsphere to get this command display all the details?

 

When i run this command " ~ # esxcli storage core device partition list", when i have 13 drives in my server it displays only 8 and all the device names are same. confused here :(

 

Device                                Partition  Start Sector  End Sector  Type          Size
------------------------------------  ---------  ------------  ----------  ----  ------------
naa.60030130f09000001a94cdbc1e6ba1d5          0             0   388497408     0  198910672896
naa.60030130f09000001a94cdbc1e6ba1d5          1            64        8192     0       4161536
naa.60030130f09000001a94cdbc1e6ba1d5          2       1843200    10229760     6    4293918720
naa.60030130f09000001a94cdbc1e6ba1d5          3      10229760   388497375    fb  193673018880
naa.60030130f09000001a94cdbc1e6ba1d5          5          8224      520192     6     262127616
naa.60030130f09000001a94cdbc1e6ba1d5          6        520224     1032192     6     262127616
naa.60030130f09000001a94cdbc1e6ba1d5          7       1032224     1257472    fc     115326976
naa.60030130f09000001a94cdbc1e6ba1d5          8       1257504     1843200     6     299876352
 

so the smart command which i am running against the device is wrong? device name should be something else?/

 

 

 

Link to comment
Share on other sites

@aron, you will be better off getting support in the VMware forums as we are not ESXi experts here, and this has nothing to do with Stablebit products.  What I do know is that the command you have issued is a list of partitions, so this is one device with 8 partitions on it and is the disk you have ESXi installed on.  It could be that your other disks are not partitioned and formatted yet or your controller is not presenting the disks properly...not really sure.  I see that your controller does appear on the compatibility list, but that doesn't necessarily mean that SMART data is supported for it in the product.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

I am missing something here. I had to set up a new machine and trying to map the drives using the easy method, but the steps seem incomplete.

 

  1. In the ESXi Console window, highlight your server
  2. Go to the Configuration tab
  3. Under Software, click Advanced Settings
  4. Click RdmFilter
  5. Uncheck the box for RdmFilter.HbaIsShared
  6. Click OK

Yes, but now that I have this set, how do I add the drives to the VM? I look in the settings of the new VM, but there are no drives to add. 

 

I think I see the problem... the VMDK files for these drives are still on the SSD I am pulling out, even though I removed them from the VM and deleted the VM from disk. Do I have to delete them from disk (somehow) before I can add the RDMs? These RDMs are on an SSD that is dying on me, which also contaned the VMDK for the VM. I moved the VM to another drive, which seems to be working. I was able to add the existing RDMs, but since they are on the SSD, I'm afraid I am still at risk.

Link to comment
Share on other sites

@RobbieH, RDM (Raw Device Mapping) devices are meant to be physical drives, not VMDK files on a drive.  It is meant to be able to take a disk with any format (NTFS, EXT4, etc) and attach it to a VM as-is, so that you can avoid having to reformat the disk as VMFS and thus destroying the existing data on it.  You do give up the ability to take a snapshot of the VM by doing so though.

 

If you have VMDK files on a failing SSD that you need to get off of there, I would suggest you just do a disk-to-disk copy and get them off as soon as possible.  If the SSD is formatted with VMFS and you need to read it in Windows, then there are several utilities out there that will allow you to do that.  

 

When you move a VMDK that has RDM disks attached to it, then you will most likely need to delete the RDM disks from the VM settings and then add them back before the VM will boot properly...delete from disk is OK here since these are just files that point to a physical location and will not impact the data on the disks.  I hope this helps!

Link to comment
Share on other sites

They are physical disks. But when you create a RDM, it creates a VMDK file on a storage resource as a pointer.

 

Step 3

Now we are going to use the vmkfstools utility to create our RDM’s. Remember that a RDM is just another VMDK, but instead of the VMDK pointing to a xxx-flat.vmdk file (which is the actual virtual hard disk), the VMDK points to our physical device. Being as we still need to create this VMDK file we need to save it somewhere. Since we just have the one local datastore, we are going to create the RDM VMDK files in it’s root.

 

Also, I can't copy out these VMDK files, I'm getting errors. And I can't remove the SSD because I get an error that it is in use. 

 

The main issue is that I can't create the RDM because it is grayed out though. I feel I need to get the SSD out of the system and/or get those VMDK files for the RDMs gone before I can do anything.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...