Disk and mount points space and properties

Here is a piece of code which gives a good idea about the drives on your system, and also about the mountpoints.

gwmi -computername Enter_Server_Name win32_volume|where-object {$_.filesystem -match “ntfs”}|ft name,Availability,BlockSize,Compressed,DirtyBitSet,IndexingEnabled,Label,LastErrorCode,PowerManagementCapabilities,Status,@{Name=’CapacityMB';Expression={$_.Capacity/1MB} },@{Name=’FreeSpaceMB';Expression={$_.FreeSpace/1MB} }

Availability – describes the availability and the status of the device. (For example, Offline)
BlockSize – Size in bytes of the blocks in this storage extent.
DirtyBitSet – If true, the Chkdsk method is automatically run by the system at the next restart.
IndexingEnabled – If true, context indexing is enabled.
Label – volume name of the logical disk
LastErrorCode – Captures the last error code reported by the logical device.
PowerManagementCapabilities – Indicates the specific power-related capabilities of the logical device.
Value Description   
0          Unknown   
1          Not Supported   
2         Disabled   
3         Enabled   
4         Power Saving Modes Entered Automatically   
5         Power State Settable   
6         Power Cycling Supported   
7         Timed Power-On Supported 

Status – there are several status options here, for example: OK, Degraded, Pred fail (predicting failure)
CapacityMB – the drive capacity in Megabytes
FreeSpaceMB – the drive’s free space in Megabytes

 Keep in mind that your SQL Server depends on your disks and mountpoints.



Comments are closed.