Array Setup and Networking
1827990 Members
2380 Online
109973 Solutions
New Discussion

Windows Target - Drive mapping

 
aherbert23
Trusted Contributor

Windows Target - Drive mapping

Have any of you ever mapped a couple of volumes for say SQL Data and Logs and once you connect them in Windows you can't tell which one is which? Both are the same size but you want to make sure you match the label and performance policy you assigned in the Nimble UI. I have a solution in a PowerShell one liner! It's not something you would memorize but copy and paste is your friend here.

Get-WmiObject -Namespace ROOT\WMI -Class MSiSCSIInitiator_SessionClass | Select -Unique TargetName, @{Label="LegacyName"; Expression={$_.Devices[0].LegacyName}}

This will give an output something like this :


TargetName                                                  LegacyName

----------                                                  ----------

iqn.2007-11.com.nimblestorage:adserver-iometer-v16da9ef3... \\.\PhysicalDrive1

iqn.2007-11.com.nimblestorage:ad-test-v16da9ef36265f874.... \\.\PhysicalDrive2


And done! These drive numbers will match up with the disk management MMC snap-in.