• Home
  • Configuring Windows Storage Spaces on the Storinator

Configuring Windows Storage Spaces on the Storinator

121215_0607_Configuring39.jpg

In-depth look at Windows Storage Spaces

An in-depth look on how to configure Windows Storage Spaces on our new storage device. We’ve got tricks and scripts to help you on your way to better storage spaces management within Server 2012 R2.


If you are a power user and want to use your new 45 Drives NAS unit as more than a simple NAS unit and you’re looking to integrate into your existing Windows infrastructure in the most native way possible, whether its for the simplicity of using the new Windows 2012 remote administration tools, or for Group Policies, or other reasons, installing Windows 2012 R2 is probably something that your looking at doing. Many administrators notice that the operating system offers a great deal of powerful features for file services that are ideal for the 45 drives unit or maybe you’re looking to use it for virtualization with Hyper-V and have directly accessible mass storage.

In my particular case, I already have an existing storage pool configured on a Norco 24 Bay chassis that is seemingly experiencing more and more problems as it ages. In an environment where you are able to experience scheduled downtime, performing a storage migration from an existing Windows Server 2012 R2 installation to a new Server 2012 R2 installation is rather painless. The other option of moving data from my Windows Server 2012 R2 server to XPEnology is still being debated, but that would require a move of the data over the network connection (25TB of data mind you). This makes it a bit less appealing, but there are some advantages to the move to XPEnology that I’ll explain in a separate article.

The focus of this article is to document how to get your storage system configured with the Highpoint drivers, web configuration utility, and get you started with Windows Storage Spaces, DeDuplication, and some scripts to monitor your storage spaces configuration that have helped me in the past.

A fully detailed document is located here.

Installing the Highpoint Technologies Raid Controller Driver

Installing Windows 2012 R2 should be a rather straight forward process for any computer user at this point as the installation process doesn’t differ much from standard Windows desktop operating system installations. On the 45 Drives system, almost all of the system drivers are automatically installed including the chipset drivers for the motherboard. The only drivers that do not automatically install are the highpoint controller drivers. I’ve documented that process below for users whom may be unfamiliar.

  1. Download the appropriate drivers from the Highpoint website here.
  2. Once logged into your Windows installation, click Start, and right click on the computer icon, followed by going to properties from the drop down.
  3. Select device manager from the new screen.
  4. You’ll notice here two yellow triangles with exclamation points shown here. Right click and select properties on one of the raid controllers.
  5. Select Update Driver from the screen shown:
  6. On the following screen, select manually install driver and select where you stored the driver.
  7. You’ll be prompted to accept the driver installation. Click Install.
  8. You should eventually be shown a successful installation, shown here.
  9. Once you close the installation of the driver, you’ll be prompted to restart. Decline the first time you install the driver on the first RAID Controller.
  10. Repeat steps 1-9 for the second RAID Controller.
  11. Restart the computer after the second successful installation of your RAID Controller.

Preparing Your Drives for Storage Spaces

It is in your best interest to make sure you prepare your drives for storage spaces installation by cleaning all your drives of any partitions. Note that by doing so will result in any data on the drives being non-recoverable and these directions were written for Windows 7 / 8 but are perfectly usable for Windows 2012.

To determine the disk number assigned to the 3TB+ MBR partitioned drive follow the steps below.

From the Start menu right click on Computer which will provide a drop down menu. (If you are on Windows 8 or 8.1 move your mouse to the bottom left hand corner of the desktop screen and right click. Then select Disk Management).

Choose Manage.

Select Disk Management (listed under Storage).

Look for the drive that is identified as the 3TB drive (2794GB). The properties window shows that the partition table on the drive is MBR .
Important: note the Disk number (such as Disk 1).

Open a Command Prompt window. To open the Command Prompt on a Windows Vista or Windows 7 machine click on Start and type cmd in the search bar. Then right click on cmd.exe and run as administrator. It will prompt you with the message, “Do you want to allow the following program to make changes to this computer,” click
yes. A black Command Prompt window will open.


On Windows 8 move your mouse to the bottom left hand corner of the desktop screen and right click. Select Command Prompt (Admin) from the pop-up menu.

This is the Command Prompt window.

From the command prompt, type diskpart and press Enter.

The diskpart prompt will open.

From the diskpart prompt, type list disk and press Enter.

A list of disks will appear in a text format. You will return to the diskpart prompt. Step one verified that Disk 1 is the 3TB drive. Warning: Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive. Please be certain that you are erasing the correct disk.

From the diskpart prompt you will need to select a disk disk number (for instance, if the 3TB+ drive is Disk 1, you would type select disk 1) and press Enter. Warning: Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive. Please be certain that you are erasing the correct disk.

A message appears saying that the disk is selected. You will return to the diskpart prompt. Warning: Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive. Please be certain that you are erasing the correct disk.

From the diskpart prompt, type clean and press Enter. The drive’s partition, data, and signature is now removed. You will return to the diskpart prompt.
Warning: Once you type clean and hit enter the drive will be erased. No warning will be provided.

The Command Prompt window will display the message “DiskPart succeeded in cleaning the disk”.  Close out of the Command Prompt window by clicking the red X in the upper right hand corner.

Now the 3TB+ drive can be re-initialized, partitioned, and formatted.

You can now repeat the process on the remaining disks you wish to add to the storage pool on your 45 drives unit.

Installing and Configuring Windows Storage Spaces

Storage Space is a new feature in Server 2012 and Windows 8 operating systems. The fundamental concept of storage space is, it pools physical disks together and make it look like a single disk to the operating system. You can add any type and size of physical disks to the pool and create resilient disk. Storage space works on both NTFS (New Technology File System) and ReFS (Resilient File System) volume. It should be noted that ReFS does not support Data DeDuplication – You can read more here. So, let’s configure storage space in Server 2012. There are four simple steps to configure storage space in server 2012. They are: –

  • Physical Disk: – The first step is to have some physical disks. You can have a minimum of one disk. But to be able to configure resiliency you need at least two or more physical disks. Physical disks are used to create storage pools.
  • Storage Pool: – In storage pool, physical disks are grouped. To add physical disks to storage pool, the disk must not be formatted and must not be associated with other storage pool. Storage pools are used to create virtual disk (storage space).
  • Virtual Disk (Storage Space): – These are the disk that will be used by the operating system or user after creating volumes of the disk. Virtual disk can be fixed or thin provision. In thin provisioning, disk spaces are added as required on the run. But in thick provisioning, storage capacity is fixed and is allocated while creating the virtual disk.

Disk Drive: – These are the volumes or partitions created on virtual disks. These disks are shown in My Computer with drive letter.

To configure storage space, Storage Services server role must be installed. This server role is installed by default in Server 2012.

 

As you can see below, I have two new physical disks, disk 1 and disk 2. We will combine these two disks and create some storage pools. Remember, after initializing the disks do not format it.

Step 1: Create Storage Pool

To create storage pool open Server Manager. Click File and Storage Services on the left pane. Then click Storage Pools from the pane. On Storage Pool pane, click Tasks and click New Storage Pool.

 

New Storage Pool Wizard pops up. In the Before you begin page, click Next. Here, type the name of the storage pool and a little description. Click Next again.

Now select the available physical disks. Click Next.

 

Review the settings and click Create.

Click Close after the wizard finishes the configuration. We have successfully created the storage pool called StoragePool1.

Step 2: Create Virtual Disk

On the virtual disks pane, click Tasks and select New Virtual Disk.

New virtual disk wizard pops up. Click Next on before you begin page. Choose the available storage pool from which virtual disk will be created. I will choose the pool that I created earlier.

Now type the name and description for virtual disk. Click Next.

Choose the storage layout. Here, I will choose simple. In simple virtual disk data is striped across physical disks and does not provide fault tolerance. Now click Next.

Select the provisioning type. I will choose thin provisioning because thin provisioning is more efficient and economic. Click Next.

Specify the size of virtual disk. I will specify 15 GB and click Next.

Review the settings and click Create to create the virtual disk.

Now view the result. Check the option, Create a volume when this wizard closes. Click Close.

Create a new volume wizard pops up. Click Next on Before you begin wizard. On Server and Disk window, select server and disk and click Next.

Step 3: Create Volume

Specify the size of the volume. I will specify 8 GB. We can later create another volume from remaining space from the same disk. Click Next.

 

 

Specify the drive letter and click Next.

 

Specify the File System Settings. Select the file system and type volume label.

 

Review the configuration and click Create.

You will now see new 8 GB volume in My Computer.

In this way, you can configure storage space in Server 2012.

Importing Storage Pool from another Server

If you’re like me and you’re trying to import your storage pool from another server, you may need to make sure you set the storage pool online and read/write. This can be accomplished through the following procedure.

Make the disks available to the server

The first step, which may have multiple sub-steps, is to physically attach and successfully make available all drives from the pre-existing storage pool.  Once you’ve completed this task, from Server Manager you should see something similar to the following (please click on any of the included screen captures for a clearer, more detailed image):

Make the storage pool read-write.

As you can see from the prior screenshot, the storage pool (as well as the virtual disk) has a warning exclamation mark symbol to indicate a problem.  By default, Windows Server 2012 will detect the foreign volume and mark it read-only.  The indicator appears because of this condition.  To proceed, right-click the storage pool and choose Set Read-Write Access…

Make it read-write.

Choose the server where the storage pool may be mounted read-write.  If this is a clustered storage pool, multiple nodes may appear in the Choose a Server for Read-Write Access dialog.

Attach the virtual disk.

The activities in prior steps make the storage pool available.  However, within the storage pool will be any virtual disks previously created using pool resources.  Just like a VHD, these must be attached in order to be accessible.  Therefore, the yellow exclamation warning sign indicates that the virtual disk is not currently attached.  To proceed, right-click on each virtual disk and choose Attach Virtual Disk.

If all is successful, each Virtual Disk chosen will be attached

4.     Online the resulting logical disk(s).

As you may recall, Windows Server 2008 Enterprise and Datacenter editions, by default do not automatically mount every disk device seen (providing that the default SAN policy has not been changed.)   Windows Server 2012 is no different.  To use any of the virtual disks that belong to the imported storage pool, you must online them first.

In Server Manager under VolumesDisks, select the disk, right-click, and choose online.

Notice at this point that the volume now appears and remains accessible.

Powershell Method

This can also be accomplished by Powershell via the following:

Get-StoragePool | Set-StoragePool -IsReadOnly $false
Get-VirtualDisk | Set-VirtualDisk -IsManualAttach $False

Fixing Media Types

One of the greatest features of Windows Storage Spaces is the ability to use storage tiering but of course, it requires that your disks be properly configured. If youre using SSDs on your RAID controllers, it will more often than not, report the disks to windows as an unknown media type rather than SSD that they need to be. Don’t worry, there’s a way to fix that though.

In order for you to be able to use tiered storage, the Windows operating system has to be able to differentiate between HDDs and SSDs. If you look at Figure 1 for example, you can see that Server Manager actually lists the media type.

 

To show you how this works, let’s start out by running the following PowerShell command:

Get-PhysicalDisk | Select-Object FriendlyName, MediaType, Size

Once you run this command, you can see that each disk has a friendly name and a media type. In this particular system, there are two SSDs and five HDDs.

For the sake of demonstration however, let’s pretend that PhysicalDisk6 was actually an SSD that had been mistakenly identified as an HDD. To correct this situation, I could use the following command:

Set-PhysicalDisk –FriendlyName PhysicalDisk6 -MediaType SSD

It is worth noting that this command will only work if the physical disk is a member of a storage pool. This command will now convert the disk to SSD. The same command should be run to identify Unknown disks that are HDD as HDDs, for example: Set-PhysicalDisk –FriendlyName PhysicalDisk6 -MediaType HDD

Obviously, it would be unsupported (and counterproductive) to lie to Windows about disk types in a production environment. However, the technique that I have just shared can be extremely useful for lab environments or for dealing with incorrectly identified hard disks in production environments. Just take care to identify disks correctly and use this command at your own risk.

Monitoring Your Storage Spaces Configuration

So you’ve got Windows Storage Spaces configured and now you’d like to monitor the drives and the overall pool? This script is probably what you want.
With some modifications, this script can be used for just about any purpose, but out of the box it’s designed to try and self recover as much as possible from drive losses and raid controller failures. The first set of information checks your storage pool for bad drives and if there is any, sends you an email report about it. If there’s more than two (or whatever you set), then it tries to restart the server to see if it’s a power or raid controller related issue.

$BadDrives = Get-PhysicalDisk | Where OperationalStatus -ne OK | Measure-Object | Select-Object -expand Count
 If ($BadDrives -gt 0){
 $SMTPServer = "smtp server"
 $SMTPPort = "25"
 $Username = "authenticated user"
 $Password = "" $OutputFile = "C:ScriptsDrives.html" $to = "recipient email address" $cc = "" $subject = "Notification from Storage Spaces Server" Get-PhysicalDisk | Where OperationalStatus -ne OK | ConvertTo-HTML FriendlyName,HealthStatus,OperationalStatus,Manufacturer,SerialNumber,Size -body "Bad Drives Listed Below" | Out-File $OutputFile echo "" >> $OutputFile Get-PhysicalDisk | ConvertTo-HTML FriendlyName,HealthStatus,OperationalStatus,Manufacturer,SerialNumber,Size -body "All Drives Listed Below" | Out-File $OutputFile -Append echo "" >> $OutputFile $BadVirtualDisks = Get-VirtualDisk | Where HealthStatus -eq Warning | Measure-Object | Select-Object -expand Count If ($BadVirtualDisks -gt 0){ Get-VirtualDisk | Repair-VirtualDisk } Get-VirtualDisk | ConvertTo-HTML FriendlyName,ResiliencySettingName,OperationalStatus,HealthStatus,Size -body "Virtual Disk Status Below" | Out-File $OutputFile -Append #$attachment = "C:drives.txt" $body= (Get-Content $OutputFile | Out-String) $message = New-Object System.Net.Mail.MailMessage $message.subject = $subject $message.body = $body $message.to.add($to) #$message.cc.add($cc) $message.from = $username #$message.attachments.add($attachment) Send-Mailmessage -smtpServer $SMTPServer -from $Username -to $to -subject $subject -body $body -bodyasHTML -priority High write-host "Mail Sent" } If ($BadDrives -gt 2){ $SMTPServer = "mailserver" $SMTPPort = "25" $Username = "username" $Password = "" $OutputFile = "C:ScriptsDrives.html" $to = "Email Recipient" $cc = "" $subject = "Notification from Storage Spaces Server - Reboot Required" $body= "System is trying to repair RAID disks with automated reboot. Rebooting now." $message = New-Object System.Net.Mail.MailMessage $message.subject = $subject $message.body = $body $message.to.add($to) #$message.cc.add($cc) $message.from = $username #$message.attachments.add($attachment) Send-Mailmessage -smtpServer $SMTPServer -from $Username -to $to -subject $subject -body $body -bodyasHTML -priority High Restart-Computer -Force }

Leave a Reply

Help spread the word

1456 Greenwood Ct. | Bethlehem, PA 18015 | 484.707.1959 | me@thomaskay.me
©2018 All Rights Reserved. Content may not be used without prior express written consent.