Some Windows Server Storage I/O related commands

January 13, 2014 – 12:47 am
Print Friendly, PDF & Email

Storage I/O trends

Some Windows Server Storage I/O related commands

The following are some commands and tools for Microsoft Windows environments that are useful for storage I/O activities (among others).

Microsoft Windows

Finding a Windows physical disk, SSD or storage system device name

So you may know and how to find out the more familiar Windows storage device (Solid State DeviceSSD, Hard Disk DrivesHDD among others) names such as A:, B:, C:, D: as what you can view from the Windows Explorer, Computer or Admin tools.

Windows storage devices

However what if you need to find out a physical name for raw (not mounted) and mounted devices for configuration? For example, if you have a tool that wants the physical name for your C: drive that might be \\.\PhysicalDrive0\?

No worries, use the command WMIC DISKDRIVE LIST BRIEF

WIndows physical device name

Need more detail about the devices beyond what is shown above?

Then use WMIC DISKDRIVE LIST or as in the above example, direct the output to a file with the results shown below (scroll to the left or right to see more detail information).

        Availability  BytesPerSector  Capabilities  CapabilityDescriptions                 CompressionMethod  ConfigManagerErrorCode  ConfigManagerUserConfig  DefaultBlockSize  Description  DeviceID            ErrorCleared  ErrorDescription  ErrorMethodology  Index  InstallDate  InterfaceType  LastErrorCode  Manufacturer            MaxBlockSize  MaxMediaSize  MediaLoaded  MediaType              MinBlockSize  Model                                  Name                NeedsCleaning  NumberOfMediaSupported  Partitions  PNPDeviceID                                                  PowerManagementCapabilities  PowerManagementSupported  SCSIBus  SCSILogicalUnit  SCSIPort  SCSITargetId  SectorsPerTrack  Signature   Size           Status  StatusInfo  SystemName  TotalCylinders  TotalHeads  TotalSectors  TotalTracks  TracksPerCylinder
              512             {3, 4}        {"Random Access", "Supports Writing"}                     0                       FALSE                                      Disk drive   \\.\PHYSICALDRIVE2                                                    2                   SCSI                          (Standard disk drives)                              TRUE         Fixed hard disk media                ATA ST3000DM001-1CH1 SCSI Disk Device  \\.\PHYSICALDRIVE2                                         0           SCSI\DISK&VEN_ATA&PROD_ST3000DM001-1CH1\5&3626375C&0&000600                                                         0        0                3         6             63               0           3000590369280  OK                  DBIOTEST    364801          255         5860528065    93024255     255
              512             {3, 4}        {"Random Access", "Supports Writing"}                     0                       FALSE                                      Disk drive   \\.\PHYSICALDRIVE3                                                    3                   SCSI                          (Standard disk drives)                              TRUE         Fixed hard disk media                SEAGATE ST600MP0034 SCSI Disk Device   \\.\PHYSICALDRIVE3                                         0           SCSI\DISK&VEN_SEAGATE&PROD_ST600MP0034\5&3626375C&0&000A00                                                          0        0                3         10            63                           600124654080   OK                  DBIOTEST    72961           255         1172118465    18605055     255
              512             {3, 4}        {"Random Access", "Supports Writing"}                     0                       FALSE                                      Disk drive   \\.\PHYSICALDRIVE4                                                    4                   SCSI                          (Standard disk drives)                              TRUE         Fixed hard disk media                SEAGATE ST600MX0004 SCSI Disk Device   \\.\PHYSICALDRIVE4                                         0           SCSI\DISK&VEN_SEAGATE&PROD_ST600MX0004\5&3626375C&0&000C00                                                          0        0                3         12            63                           600124654080   OK                  DBIOTEST    72961           255         1172118465    18605055     255
              512             {3, 4}        {"Random Access", "Supports Writing"}                     0                       FALSE                                      Disk drive   \\.\PHYSICALDRIVE1                                                    1                   SCSI                          (Standard disk drives)                              TRUE         Fixed hard disk media                SEAGATE ST9300603SS SCSI Disk Device   \\.\PHYSICALDRIVE1                                         0           SCSI\DISK&VEN_SEAGATE&PROD_ST9300603SS\5&3626375C&0&000400                                                          0        0                3         4             63                           299992412160   OK                  DBIOTEST    36472           255         585922680     9300360      255
              512             {3, 4}        {"Random Access", "Supports Writing"}                     0                       FALSE                                      Disk drive   \\.\PHYSICALDRIVE0                                                    0                   SCSI                          (Standard disk drives)                              TRUE         Fixed hard disk media                VMware Virtual disk SCSI Disk Device   \\.\PHYSICALDRIVE0                                         2           SCSI\DISK&VEN_VMWARE&PROD_VIRTUAL_DISK\5&1982005&1&000000                                                           0        0                2         0             63               -873641784  64420392960    OK                  DBIOTEST    7832            255         125821080     1997160      255

Remembering (or learning) Xcopy

Some of you might be familiar with Xcopy and if not, it is a handy tool for copying files, folders and directories to local as well as networked storage. Some handy Xcopy command switches include:

/j = use un-buffered IO for large files
/y = suppress prompting
/c = continue if error
/E = copy sub directories
/H = copy hidden files
/Q = quiet mode (don’t list files being copied)

In the following example the content of the Videos folder and its sub-directories (83.5GB) are copied to another destination. Note the Time /T command that is also shown which is useful for timing how long the copy takes (e.g. subtract start-time from end-time and you have elapsed time). In this example 83.5GB are copied from one place to another on the same SSD device and using the results of the Time /T command the elapsed time was about 12 minutes.

Windows SSD TRIM
Xcopy command example

Diskpart, don’t be scared, however be careful

Ever have a Windows storage device or system that failed to boot, or a problem with a partition, volume or other issue?

How about running into a situation where you are not able to format a device that you know and can confirm is ok to erase, yet you get a message that the volume is write protected or read only?

Diskpart is handy, powerful and potentially dangerous tool if you are not careful as you could mistakenly drop a good volume or partition (e.g. the importance of having good backups). However Diskpart can be used to help repair storage devices that have boot problems, or for clearing read only attributes among other tasks. If you are prefer GUI interfaces, many of the Diskpart functions can also be done via Disk Management interface (e.g. Control Panel -> All Control Panel Items -> Administrative Tools -> Computer Management -> Storage -> Disk Management ). Note that Diskpart to do certain functions will need to be run as Administrator.

windows diskpart

In the above example the LIST DISK command shows what disks are present (on-line or off-line) which means that you may see devices here that do not show up elsewhere. Also shown is selecting a disk and then listing partitions, selecting a partition and showing attributes. The Attribute command can be used for clearing Read Only modes should a partition become write protected.

Hint, ever have a device that was once had VMware installed on it, then you move it to Windows and try to reformat for use and get a Read Only error? If so, you will want to have a look at Diskpart and the Attribute commands. However BE CAREFULL and pay attention which disk, partition and volumes you are working with as you can easily cause a problem that would result in testing how good your backups are.


If you have a SATA SSD the TRIM command is a form of garbage collection that is supported with Windows 7 (SAS drives use the SCSI UNMAP). Not sure if your system has TRIM enabled? Try the following command as administrator. Note that if you see a result of "0" then TRIM is enabled while a value of "1" means that it is disabled for your system.

Windows SSD TRIM

Want to learn more about TRIM, check out this piece from Intel as well as this Microsoft Windows item.

Having issues with collecting CPU and performance statistics?

Have an issue or problem collecting your system statistics, or when running a benchmark, workload generation tool such as vdbench and getting an "Unable to obtain CPU statistics"?

Try the Lodctr /R command (as administrator), however read this Microsoft Tip first to learn more.

Windows Lodctr /R

Sdelete and drive erase

Like its name implies, if you do not have this tool, you can download it here from Microsoft to not only delete files, folders, as well as write "0" patterns across a disk to secure erase it. You can specify the number of times you want to run the write "0" patterns across a disk to meet your erasure requirements.

There is also another use for Sdelete which is if you need or want to pre-condition a SSD or other device such as for testing, you can run a pre-conditioning pass using Sdelete.

Some command options include -p #n where "n" is the number of times to run, -s recursive to process sub-directories, -z to write "0" or zero out the space on the device, -c for clean, -a to process read-only attributes. Learn more and get your copy of Sdelete from Microsoft here.

Rufus, Seatools, Samsung Disk Magician and Cyberduck

A handy tool available from Seagate (may only work with Seagate and their partner devices) is SeaTools that can give drive information, health and status as well as perform various tests including SMART.

Seagate Seatools
Seagate Seatools example

Different HDD and SSD as well as storage system vendors give tools for configuration, monitoring, management and in some cases data movement with their solutions. Samsung SSD Magician is a tool I have installed for managing my SSDs (830 and 840 Pros) that has features for updating firmware, drive health as well as performance optimization. Other hand tools include the Samsung copy tool based on Clonix as Acronis among other clone or data migration utilities (more on those in a future post).

Samsung SSD Magician
Samsung SSD Magician

While the Microsoft WIndows USB Tool is handy for dealing with Microsoft ISO, however for creating USB’s with ISO’s such as for installing VMware or Linux on bare metal systems, Rufus is a handy tool to have in the tool-box.

Rufus ISO to USB tool

Another useful tool that functions as an SSH and FTP utility is Cyberduck that also supports access to Amazon S3 among other cloud services.

There are many other tools for server, storage I/O and other activities on WIndows, not to mention other platforms, however hopefully you find the above useful.

How about it, what’s your favorite Windows server, storage I/O tools and commands?

Ok, nuff said (for now)


Greg Schulz – Author Cloud and Virtual Data Storage Networking (CRC Press), The Green and Virtual Data Center (CRC Press) and Resilient Storage Networks (Elsevier)
twitter @storageio

All Comments, (C) and (TM) belong to their owners/posters, Other content (C) Copyright 2006-2018 Server StorageIO and UnlimitedIO LLC All Rights Reserved