Primary Storage

 View Only
Expand all | Collapse all

Using SVC with Flashsystems presented. How do I find the volume UID (serial number) for a SAN volume mapped to a windows server FROM a windows server?

  • 1.  Using SVC with Flashsystems presented. How do I find the volume UID (serial number) for a SAN volume mapped to a windows server FROM a windows server?

    Posted Mon March 21, 2022 03:44 PM

    FYI - the host in question here is a Windows 2016 Cluster server consisting of two nodes. 
    Using most storage devices, I can run the following command, or something similar, on a Windows server, to return the volume (or LUN) serial number coming from the IBM storage device.

    Why I want this:
    A SQL admin who managed a Windows 2016 cluster would like to request that a drive presented to it by the SVC is expanded by 50 GB. The admin states that the drive is called WINSERVER4_Drive_R and needs to be grown from 50 to 100 GiB. There are several 50 GiB drives presented. I want to verify that I am growing the correct volume. To do that, I need to confirm the serial number of the drive on the Windows server.

    I ask the admin to run the following Powershell script:

    $AllDevices = gwmi -Class Win32_DiskDrive -Namespace 'root\CIMV2'

    ForEach ($Device in $AllDevices) {

    @{

    Name=$Device.Name;

    Caption=$Device.Caption;

    Index=$Device.Index;

    SerialNo=$Device.SerialNumber;

    } | Format-Table -AutoSize

    }

    which returns the following for that drive
    Name Value
    ---- -----
    Caption IBM 2145 Multi-Path Disk Device
    Name \\.\PHYSICALDRIVE4
    SerialNo 0203202107b6XX03
    Index 4

    The name and serial number of the drive are actually:
    WINSERVER4_R_Backup,600507680C80841ED80000000000A8EB,650.00 GiB

    When I run this script on a Windows server connected to a Pure storage array, the real serial number is returned. 

    The drives are being presented from a stretch SVC cluster and there are volume mirrors on both sides of the cluster. The SVC is virtualizing a FS9200 behind it, and this is where the physical storage comes from. 

    Does anyone know of a way to find the actual IBM UID for a volume being presented to a windows host FROM a windows host? 



    ------------------------------
    Scott Herdliska
    ------------------------------


  • 2.  RE: Using SVC with Flashsystems presented. How do I find the volume UID (serial number) for a SAN volume mapped to a windows server FROM a windows server?

    Posted Tue March 22, 2022 04:10 AM
    I am using "inq" executable from Dell/EMC. This executable exists for the majority of OS (AIX, Linux, Windows, HPUX, Solaris ....).
    Gives consistent info on all of those OS for different storage vendors (IBM, Dell, Hitachi, Fujitsu, Pure .....).

    Example output on Windows :

    -------------------------------------------------------------------------------
    DEVICE :VEND :PROD :WWN
    -------------------------------------------------------------------------------
    \\.\PHYSICALDRIVE0 :HP :LOGICAL VOLUME :600508b1001cdff2b94fa8fe16429670
    \\.\PHYSICALDRIVE1 :IBM :2145 :60050768108182c3c0000000000006fe
    \\.\PHYSICALDRIVE2 :IBM :2145 :60050768108182c390000000000000b1
    \\.\PHYSICALDRIVE3 :IBM :2145 :60050768108182c390000000000000b2
    \\.\PHYSICALDRIVE4 :IBM :2145 :60050768108182c390000000000000be
    \\.\PHYSICALDRIVE5 :IBM :2145 :60050768108182c390000000000000ae
    \\.\PHYSICALDRIVE6 :IBM :2145 :60050768108182c390000000000000b3
    \\.\PHYSICALDRIVE7 :IBM :2145 :60050768108182c390000000000000b4
    \\.\PHYSICALDRIVE8 :IBM :2145 :60050768108182c390000000000000b5
    \\.\PHYSICALDRIVE9 :IBM :2145 :60050768108182c390000000000000bc
    \\.\PHYSICALDRIVE10 :IBM :2145 :60050768108182c390000000000000bb

    ------------------------------
    Hans Populaire
    ------------------------------



  • 3.  RE: Using SVC with Flashsystems presented. How do I find the volume UID (serial number) for a SAN volume mapped to a windows server FROM a windows server?

    Posted Tue March 22, 2022 11:26 AM
    @Scott Herdliska
    Hi Scott, I recently came across the same inquiry from a customer.
    It turned out, that native Windows PowerShell commands can do the job:

    PS C:\Users\Administrator> Get-PhysicalDisk | Select-Object FriendlyName,SerialNumber,UniqueID

    FriendlyName SerialNumber UniqueID
    ------------ ------------ --------
    PhysicalDisk10 02042060b714XX00 60050768108102DC5000000000000039
    PhysicalDisk6 02042060b714XX00 60050768108102DC5000000000000035
    PhysicalDisk4 02042060b714XX00 60050768108102DC5000000000000032
    PhysicalDisk5 02042060b714XX00 60050768108102DC5000000000000034
    PhysicalDisk9 02042060b714XX00 60050768108102DC5000000000000038
    PhysicalDisk7 02042060b714XX00 60050768108102DC5000000000000036
    PhysicalDisk2 020420600460XX00 60050768108700121000000000000058
    PhysicalDisk3 020420600460XX00 60050768108700121000000000000059
    PhysicalDisk8 02042060b714XX00 60050768108102DC5000000000000037
    PhysicalDisk11 02042060b714XX00 60050768108102DC500000000000003A
    PhysicalDisk0 Y310A0CBFQ93 5000039528003528
    PhysicalDisk1 P098700Z 5000A7203000B9B9

    The inq executable mentioned in @Hans Populaire's post sounds interesting too.​

    ------------------------------
    Christian Schroeder
    IBM SpecV Storage Support with Passion
    ------------------------------



  • 4.  RE: Using SVC with Flashsystems presented. How do I find the volume UID (serial number) for a SAN volume mapped to a windows server FROM a windows server?

    Posted Tue March 22, 2022 12:20 PM
    Boom! That did the trick! Thank you!. The part I was missing was the UniqueID, which is the real serial! Thank you!!!!!

    ------------------------------
    Scott Herdliska
    ------------------------------



  • 5.  RE: Using SVC with Flashsystems presented. How do I find the volume UID (serial number) for a SAN volume mapped to a windows server FROM a windows server?

    Posted Wed March 23, 2022 02:25 AM
    Thanks for the feedback - glad to hear we were able to help!

    ------------------------------
    Christian Schroeder
    IBM SpecV Storage Support with Passion
    ------------------------------



  • 6.  RE: Using SVC with Flashsystems presented. How do I find the volume UID (serial number) for a SAN volume mapped to a windows server FROM a windows server?

    Posted Thu March 24, 2022 12:50 PM
    Edited by Scott Herdliska Thu March 24, 2022 12:53 PM
    Here's the Powershell script we ended up using. We are still tweaking, but I figured I'd post it here so others might benefit. 
    My goal was to obtain a drive letter that corresponds with a SAN volume presented from an IBM SVC to a physical Windows server. I also wanted the drive size and the amount consumed as an extra bit of info to compare with an admin request for modifying an existing volume:

    $PhysicalDiskList = Get-PhysicalDisk
    $LogicalDiskList = Get-CimInstance -ClassName CIM_LogicalDisk | Where-Object -Property 'DriveType' -EQ -Value 3
    $Result = foreach ($LogicalDisk in $LogicalDiskList) {
    $DiskPartition = Get-CimAssociatedInstance -InputObject $LogicalDisk -ResultClass CIM_DiskPartition
    $PhysicalDisk = $PhysicalDiskList | Where-Object -Property 'DeviceID' -EQ -Value $DiskPartition.DiskIndex



    $SizeGB = $LogicalDisk.Size/1GB
    $FreeSpaceGB = $LogicalDisk.FreeSpace/1GB



    [PSCustomObject]@{
    DriveLetter = $LogicalDisk.DeviceID
    SizeGB_Rounded = [math]::round($SizeGB, 1)
    freeSpaceGB_Rounded = [math]::round($freeSpaceGB, 1)
    DriveModel = $PhysicalDisk.FriendlyName
    UniqueID = $PhysicalDisk.UniqueId
    }
    }



    $Result | Format-Table -AutoSize

    I may find some pre-requisites, I will add them as I continue my testing and tweaking. 

    ------------------------------
    Scott Herdliska
    ------------------------------