Friday, May 29, 2020

Setting up storage spaces virtual disk with a two disk parity using powershell

On Server 2019 I came across an issue setting up a storage spaces virtual disk in the Server Manager GUI.  You can view the issue and resolution on my YouTube channel https://www.youtube.com/watch?v=l1UEUi3twOg or continue reading the post.  I have an Intel Socket 2011 Board with a Intel E-2620v1 Xeon.  This motherboard has 6 sata ports, and I added in  a Silicon Image 3132 1x PCI-E card (2 ports) for some additional storage ports for a total of 8.  I have a single OS drive, a "scratch/temp" drive, and the rest of the disks I wanted to setup as a single storage disk for setting up and testing VMs.

So in my server manager you can see the 6 disks I am going to use., 2 of them are detected on a raid bus (Si3132 controller) the other 4 are detected as SATA.


Creating the Storage Pool works just fine.


Tasks -> New Storage Pool -> Give it a name and description


Select the disks you want to use


Once you confirm your settings, create your storage pool


Then open up the create a virtual disk wizard


Select the storage pool, in this case DATA


The new virtual disk wizard will then run, give your virtual disk a name


Specify enclosure resiliency (if applicable - in this case it isn't.)


Select your storage layout


Select your provisioning type (in this case fixed)


Define the size of the virtual disk


Create the virtual disk.


At this point creating the virtual disk will fail.  It should have setup the disk as a 6 disk parity with a single drive redundancy, this is how the wizard has been setup requiring a minimum of 7 disks for a 2 disk parity.



So at this point I switched to powershell, to create the storage spaces virtual disk.  I deleted the storage pool, even though it wasn't necessary; but I like starting clean, it helps keeps any issues down to a minimum.

If you haven't already install the latest version of powershell from github.  https://github.com/PowerShell/PowerShell

To make sure I can add all me disks to the storagespaces pool, I ran the following command.

PS C:\Users\Administrator> Get-PhysicalDisk -CanPool $True


Then I put these disks into a variable called $pd and created storage pool called DATA.
PS C:\Users\Administrator> $pd = (Get-PhysicalDisk -CanPool $True)
PS C:\Users\Administrator> New-StoragePool -PhysicalDisks $pd -StorageSubSystemFriendlyName "Windows Storage*" -FriendlyName "DATA"


Now that the storage pool is created we can create or virtual disk.

PS C:\Users\Administrator> New-VirtualDisk -StoragePoolFriendlyName "DATA" -FriendlyName "DATA" -Size 1000GB -ProvisioningType Fixed -ResiliencySettingName "Parity" -PhysicalDiskRedundancy 2


With the virtual disk made we can go into computer management and online the disk, initialize, format and set it up how ever we like.  After running the powershell commands if you want to see things in server manager you may have to do a physical refresh to have it all show up in the dashboard.



How to migrate PFSense Over to KEA DHCP Server from ISC DHCP Server

I am a PFSENSE User and I manage PFSENSE for some other organizations and the time has come to make the switch for the DHCP Server over to K...