Retrieve Disk Health information with PowerShell

With the PowerShell Get-StorageReliabilityCounter cmdlet you can get the storage reliability counters for a specified disk or all disks in your system. These counters include information about such things as the device temperature, errors, wear, and length of time the device has been in use (if your devices supports these).


What happen?

I just tried to copy 3 files from a VM to a share on another machine and the copy job stopped at halfway. The VM became extreme sluggish and I knew something bad was going on. A quick peek at the eventlog and I saw a lot of red bubbles with the source being disk…

Log Name: System
Source: disk
Event ID: 7
Level: Error
Description:
The device, \Device\Harddisk3\DR3, has a bad block.

SMART Monitoring

My server contains 5 disks and is running Microsoft Windows Hyper-V Server 2016. For this reason there aren’t many tools available where you can take a quick peak at the disks SMART sensors. But this shouldn’t be a problem because I got a monitoring solution running which monitors SMART and should tell me more info.

2 day graph of the SMART values from my faulty disk
and the 30 day graph from the same disk

SMART did not register any errors or at least my monitoring tool did not pick up the new values. I will have to dig into that to see what the issue really is.

With PowerShell I was still able to get a more in-depth view of the problem.

Running the command beneath this line in a administratively promoted PowerShell prompt you will get all the information Windows has on your disks.

Get-Disk | Get-StorageReliabilityCounter | Format-List -Property *

The output will be something like this:

ObjectId : {1}\\CH..\root/Microsoft/Windows/Storage/Providers_v2\SPACES_StorageReliabilityCounter.ObjectId=”{..an ID..}:RC:\\?\scsi#disk&ven_samsung&prod_hm640jj#4&314aa983&0&0..#{5..-b..-1..-9..-0..}”
UniqueId : {2..}:RC:\\?\scsi#disk&ven_samsung&prod_hm640jj#4&3..#{5..-b..-1..-9..-0..}
DeviceId : 3
FlushLatencyMax : 6720
LoadUnloadCycleCount : 53459
LoadUnloadCycleCountMax :
ManufactureDate :
PowerOnHours : 38162
ReadErrorsCorrected : 0
ReadErrorsTotal : 49
ReadErrorsUncorrected : 49
ReadLatencyMax : 12825
StartStopCycleCount : 3544
StartStopCycleCountMax :
Temperature : 33
TemperatureMax : 0
Wear : 0
WriteErrorsCorrected :
WriteErrorsTotal :
WriteErrorsUncorrected :
WriteLatencyMax : 12312

The values in red are way to high for a normal functioning disk. Flush Latency Max and Write Latency Max are less than 100 for my other disks. If you encounter Read Errors on your disk you know things aren’t going to get better.

I’m going to proceed with a full chkdisk with the bad sectors option switch on and see how bad it’s going to get with this disk. Thankfully there is no real important data on this disk but if there was any valuable data on this disk I would suggest you make sure your files are stored on another disk and replace this one asap.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s