Storage spaces is the mechanism or technology that enables you to virtualize storage by grouping disks into storage pools, and then creating virtual disks called storage spaces from the available capacity in the storage pools.

Let’s say that we have a server that’s got a couple of 1 TB hard drives, and let’s say for the sake of redundancy we decide that we’re going to mirror these disks. So we create a RAID 1 mirror on these physical disks, and then we create a volume in Windows on top of that mirror and every time data is written to this volume, it actually gets written to both disks. Now if one of the physical disks fails, we can continue operating, since the other disk will have a copy of the data. However, someone will need to replace the failed disk in the mirror so it can become healthy again. So there’s some manual work and administrative intervention required. The other downside with this setup is that there’s limited flexibility. Once we mirror these two volumes, our total available capacity is going to be fixed at 1 TB, so if we create a volume that uses all that space, we don’t have easy options for extending it later, at least not without a lot of manual work. So Storage Spaces removes some of these limitations when we’re working with local or direct-attached storage; it gives us some flexibility, because we can over-provision our volume sizes and add more physical disks later. And there’s also more flexibility in terms of resiliency and recovering from failed disks. So as an alternative, let’s say that we’ve got a Windows Server 2016 machine, it has a number of local disks. These could be internal disks inside the server, or they could be from direct-attached storage. But instead of implementing a traditional RAID setup, we can instead pool all the physical disks together within the operating system, and from there we can create a storage space, also referred to as a virtual disk, using some or all of the storage in the pool. Physical disks size don’t have to be identical; they can be different sizes and they can even be different types. So we could have a mixture of SATA, SAS, SSD-based disks, or even USB disks. Now when we created a virtual disk using the storage in the pool, we’re creating a flexible storage space. Keep in mind that the virtual disk terminology used here is different than VHDX. These are not VHDX files. So the naming is a little bit confusing, so just remember that when you’re working with Storage Spaces, virtual disks are a different concept.

I have set up six different disks that we’ll be connecting to for the purposes of creating a storage spaces and tiered storage. The four disks on the left side are 278 GB disks. I’ve also 2 additional disks, of 557 GB in size.

screenshot.21.jpg

One of the very first tasks we’ll do is we’ll take two of these 278 GB disks and connect them together, squoosh their contents together to create a single storage space that we could either host files on or make available on the network.

screenshot.22.jpg

Let’s get started. Open Server Manager –> File and Storage Services –> Disks

If I take a look at the available disks that are connected up into this server we can see all six of these that are currently attached. You can see that they’re in an unknown state; they haven’t been partitioned or formatted.

screenshot.11

In order for us to use storage spaces, to configure it, we’ll begin by creating what is called a storage pool.

  • Storage pools. A collection of physical disks that enable you to aggregate disks, expand capacity in a flexible manner, and delegate administration.
  • Storage spaces. Virtual disks created from free space in a storage pool. Storage spaces have such attributes as resiliency level, storage tiers, fixed provisioning, and precise administrative control.

So on the left-hand side I’m going to go to Storage Pools, and you can see by default we have this concept of a primordial pool, and that means all available disks that we can use to create storage pools. We can see all disks under physical disks.

screenshot.12.jpg

Right-Click on empty space (or click on tasks –> New Storage Pool) and select New Storage Pool

screenshot.1

New Storage Pool Wizard will pop-up. Click Next.

On Specify a storage pool name and subsystem page, here we need to give it a name so in my case it will be StoragePool1, once done click Next.

screenshot.2

On Select physical disks for the storage pool page, here are the disks that we can add to the pool. I will select two 278 GB disks. Now here’s where things start to get really cool. So, when I configure these disks, one of the things I can do is determine how I actually want the disks to be available or to be configured when I’m creating this storage pool. So, by default I have these two disks currently set up here as automatic for their allocation, but I could if I want configure one of them to be, for example, a hot spare instead of an automatic disk (hot spares can be used to automatically replace failed disks in the storage pool that’s being used by a storage space) or I could set it up to be a manual disk instead of an automatic disk. By having two of these set to automatic, that allows me actually to create a little later on a storage space that supports one of the RAID levels, like RAID 1 with mirroring.

screenshot.13.jpg

screenshot.14.jpg

Now we’re not going to configure that here because we’ll take care of that when we begin creating the volume that’s on the storage space, but remember, I’ve got a couple of these disks in here because I want to create a mirrored, which will be a highly available storage space, when I get to the next step in the process. Click Next

On Confirmation page, click Create

screenshot.8.jpg

Once the process is complete, we can take a look back here under Storage Pool and see the storage pool that we’ve created with its 556GB of capacity and nearly 555 GB of free space. With this storage pool, we’ve created the next thing we need to do is actually to create a disk, a virtual disk, out of the storage pool. This virtual disk here is more or less like the actual disks that you’ve been dealing with in the past in previous operating systems when you’ve been connecting to them through the disk management console. Now one important thing to recognize here is that a virtual disk also exists as kind of an additional layer of abstraction between the storage pool, the actual disks we’re working with, and the volumes that we’ll ultimately make available from the storage of Windows files. So, as you’ll see here, we can create multiple virtual disks that exist in a storage pool and then create multiple volumes that exist in each virtual disk. Let’s create new virtual disk by right-clicking on our storage pool and selecting new virtual disk

screenshot.6.jpg

When we create a new virtual disk, we have to identify which storage pool we want to use. This will be the 556 GB storage pool we created. Click OK

screenshot.8

On Before you begin page, click next

On Specify the virtual disk name, give your virtual disk a name. (Remember, virtual disks and Storage Spaces are different than the VHDX files)

Notice the setting here where it says Create storage tiers on this virtual disk. So if I had both magnetic and SSD-based disks in the storage pool, I could make use of storage tiers here. Click Next

screenshot.9

Specify enclosure resiliency page, Enclosure Awareness gives you some resiliency if you have storage failures. So notice the note at the bottom telling you that you need to have at least three enclosures and the physical disks in those enclosures must be set for automatic allocation in the storage pool. So in that scenario, you’d have multiple enclosures connected via direct-attached storage, and then you’d have some resiliency there and the means to recover from some kind of hardware failure. Well let’s go ahead and hit Next.

screenshot.11.jpg

Select the storage layout page, Here we determine what the storage layout will be. Now, that can be no high availability at all, here is the Simple layout, where we essentially stripe the data across those physical disks. This would be equivalent to a RAID 0 configuration. If I have at least two disks or even as many as five disks, I could choose the Mirror configuration. I need two disks to support the loss of a single disk at a time and five disks to protect from two simultaneous disk failures. The Mirror is equivalent to RAID 1. Last in the list is Parity— the Parity is equivalent to a RAID 5, where if I have at least three disks, that would allow me to protect me from a single disk failure, whereas seven disks would protect me from two disk failures. The Parity option here offers some different performance characteristics with different consumption characteristics as well. I will choose Mirror here because I have a couple of disks that I want to stripe this content across, once done click next

screenshot.12

Specify the provisioning type page, we need to decide which provisioning type we are going to configure or use.

  • Fixed –  This provision type means that we’re going to create a virtual disk that cannot exceed the actual storage pool capacity
  • Thin – This provision type means that we can create volume and make it much bigger than the storage pool can accommodate and then we can add physical disks later. So with Thin provisioning we can create volume that is much larger than the total size of the storage pool. Over time, if we start to get close to using up the actual total capacity of the storage pool, Windows will give us a warning and we can easily just add more physical disks to the pool, and that’s one of the great things about Storage Spaces.

I’ll choose the thin provisioning and click next

screenshot.13

Specify the size of the virtual disk page, for the size I’ll enter 1024 GB and hit Next, and click on Create.

screenshot.14

With the virtual disk built notice we’ve got an option at the bottom to create a new volume when the wizard closes, so let’s leave that enabled and click on Close, and that’ll take us into the wizard to create a volume, just like we’ve been using all along. So let’s hit Next on Before you begin page.

screenshot.15.jpg

The New Volume Wizard goes through a bunch of very similar steps like what we’ve seen already because there are these multiple tiers of storage that we’ll be provisioning out for different reasons. So, we’ll connect up to our server and you can see our disk 7 that we’ve created and that storage spaces disk titled VirtualDisk1. I’ll choose Next,

I will choose the entire size of the volume, so I’ll fill the disk with that volume that we’re creating. Click Next

screenshot.17.jpg

I will give it a Drive letter here, D is fine, click next

screenshot.18

Here we’ll choose the NTFS file system, I’ll go ahead and update the volume lable to Volume1, and we’ll go ahead and create that volume.

screenshot.19.jpg

On Completion page click close. Click on our storage pool, and down at the bottom on the left-hand side we can see our virtual disk, 1 TB in size. We can also see the physical disks that maps to in the storage pool.

screenshot.7.jpg

If we ever got to the point where we are getting close to exceeding the actual underlying physical storage limits, we could add more physical disks by right-clicking on storagepool1 and selecting Add Physical Disk

screenshot.21.jpg

Heading back over to Disks on the left-hand side you can see now a Disk 7, which is our virtual disk; you can see the Bus Type is Storage Spaces and kind of just looking at the bottom windows, we can see the D volume with a 1 TB capacity. Over on the right-hand side, we actually see what it is on the storage pool. We see that there’s 553 GB free. So that’s the process of creating the storage pool and the storage space.

screenshot.22

Tiered Storage

Another functionality that’s built into Windows Server is the ability to take our storage spaces and configure them just so that they can support what is called tiered storage. Now up until this point, we have dealt with the creation of a single storage space using 2 disks. These are a pair of HDD disks attached to this machine and they are mirrored together.

screenshot.2

SSDs, especially the Enterprise type SSDs that you would want to put into a server can be an order of magnitude more expensive than your traditional hard disks, especially when you’ve got a very large amount of space that you need to host for other kinds of uses, like the storing of Office documents. In these circumstances, you might not want to buy SSDs for storing Office documents, but you still want to make sure that you have good performance for users that are coming in. Tiered storage provides you the ability to accomplish this by taking your hard disks, your traditional hard disks, and connecting them together with your SSD drives to create that single visible storage space. The neat part here is that the Windows storage subsystem can handle making sure that the right documents end up on the SSDs and then documents that are really no longer being used as much can be deprioritized back onto the traditional spinning hard disks to be made available the next time a person needs to make use of them. This use of SSDs as a caching functionality is essentially what we’re attempting to accomplish here with tiered storage.

Now in order for us to be able to use storage tiering, we have to have both SSD and traditional spinning hard drives, which we don’t actually have at this point because all disks that are configured for this storage pool are actually HDD. I will show you really quick just kind of a little hack that you can implement when you’re demoing this at home so that you can create tiered storage without having to go out and buy both SSD and traditional spinning hard drives.

The way in which we actually build tiered storage starts in server manager by creating another storage pool. I have 3 disks left which I will use for Tiered Storage.

screenshot.1

I already created new Storage Pool (StoragePool2). As you can see all my disks have Media Type set to Unknown.

screenshot.15

So let’s change Media Type to HDD and SSD. To be able to change Unknown to SSD or HDD we need to open powershell and run Set-PhysicalDisk command. You can type in Get-PhysicalDisk first to get a list of all PhysicalDisks. I need to convert Physical Disk 01, 04, 05 and 06, so Physical Disk 04 and 05 will be SSD and Physical Disk 01 and 06 will be HDD.

Set-PhysicalDisk -Friendlyname PhysicalDisk04 -MediaType SSD (This command will reset the mediatype to SSD so that Windows believe that 04 is Solid State Drives. Run this command to convert 05 to SSD and the same command for disk 1 and 6 but change SSD to HDD.

screenshot.16.jpg

Now let’s go back to Server Manager and then refresh the view. If I’ve done this correctly I should be able to see indeed I’ve reconverted these 4 disks now so that Windows believes they’re the kind of disks that we need in order to do tiered storage.

screenshot.17.jpg

In order to create that tiered storage, what I need to do is from this storage pool actually create a virtual disk out of the pool. We’ve already seen how this process works when we created Storage Spaces. Right-Click on StoragePool2 and select new Virtual Disk

screenshot.13

When we create a new virtual disk, we have to identify which storage pool we want to use. This will be our second storage pool StoragePool2. Click OK

screenshot.18.jpg

I’ll create a new disk called VirtualDisk2 and in this case I will choose to create the storage tiers on the virtual disk. Click Next

screenshot.15.jpg

On the Specify enclosure resiliency page, click next

On Select the storage layout page, I’ll choose Mirror. Click Next

screenshot.17.jpg

I’ll choose fixed disks here because storage tiers do require fixed disk provisioning

screenshot.18

Here I have a slightly different option for how I’m going to determine what size is going to be provisioned for both the faster tier, the SSD tier, and then the standard tier, the hard disk, the traditional spinning disks tier. I can choose maximum size for both of these because I’m not really interested in adjusting the size. Click Next and Create

screenshot.20.jpg

Last step is to create a volume. I’ll skip the process of creating a volume because you’ve already seen how that works back on Storage Spaces part. When we create volume on that storage and provision it out to users, it will allow those users to copy files into that location and not have to worry whether they’re in the cache or whether they’re back on the spinning disk, the Windows subsystem will take care of everything for you.

What we covered

  • What is Storage Spaces and How to configure it
  • What is Tiered Storage and How to configure it

 

Thanks for reading!

Cheers,

Nedim