Storage Pools and Physical Disks with Identical Names

Recently I setup a small home lab using some retired hardware I’d acquired through a friend. During the configuration of one of these machines I encountered a particular issue I’d never come across previously. I wasn’t able to add all my disks to a storage pool, seemingly because they had identical names.

I’d been using Server Manager to manage the storage pool as I wasn’t creating anything too complicated and should have been a simple point and click process. However I had three disks out of four that had identical names, and this seemed to cause Server Manager to have issues displaying them all and adding them all to the storage pool.

The solution was to use PowerShell to add them all to the pool using a line from Microsoft’s Technet page for Add-PhysicalDisk.

PS C:\> Get-StoragePool -IsPrimordial $False | Add-PhysicalDisk -PhysicalDisks (Get-PhysicalDisk -CanPool $True)

This command gets all storage pools except primordial pools and pipes the output to the Add-PhysicalDisk cmdlet. The Get-PhysicalDisk cmdlet in brackets narrows the scope to drives that are available to be pooled. This command will only work if you have a single storage pool though.

Now that the drives were all in the storage pool everything should have been fixed, but unfortunately this was not the case. I wasn’t able to create a parity volume like I’d intended because Server Manager could still only see two of the drives in the pool which meant that the pool didn’t meet the minimum requirements for a parity volume, three disks.

After some more Google searches I found out you could rename disks, however the command used the “FriendlyName” to reference the disks to be renamed. What this meant in practice was that you’d end up renaming all three drives to the new identical name. So I needed to find a way to reference a specific disk and pipe that into the command to rename the disk. Here was my solution.

PS C:\> Get-PhysicalDisk

FriendlyName        SerialNumber   CanPool OperationalStatus HealthStatus Usage            Size
------------        ------------   ------- ----------------- ------------ -----            ----
Intel Raid 1 Volume System         False   OK                Healthy      Auto-Select 465.76 GB
ST3250823AS         XXXXXXX1       False   OK                Healthy      Auto-Select 232.75 GB
ST3250823AS         XXXXXXX2       False   OK                Healthy      Auto-Select 232.75 GB
ST3250823AS         XXXXXXX3       False   OK                Healthy      Auto-Select 232.75 GB
SAMSUNG SP2504C     XXXXXXXXXXXXXX False   OK                Healthy      Auto-Select 232.75 GB

PS C:\> Get-PhysicalDisk -SerialNumber XXXXXXX1 | Set-PhysicalDisk -SetFriendlyName "Seagate 250 GB-1"

I used the Get-PhysicalDisk command to list all the Serial Numbers, then used the Get-PhysicalDisk command again referencing a specific serial number and piping that output into the Set-PhysicalDisk command to rename the drives individually.

With this done, Server Manager was now able to see all the drives in the storage pool and I was able to create the volumes I needed. In the future I’ll probably just do everything with PowerShell, because this was kind of a ridiculous problem to have to solve in the first place.