Computers and Internet

Windows Server 2012 – Storage Spaces and Data Deduplication Hands-on Review Part 4

This is the continuation and Part 4 of my Storage Spaces and Data Deduplication review. Here’s an index of test cases on this part and links to other parts:

  • Part 1: Introduction and Lab Environment Preparation
    • Physical Disk Pull
    • Introduce the Pulled Disk Back into the System
    • Extend Thinly Provisioned Virtual Disk and Observe Behavior at Limits
    • Bonus: Detecting and Replacing Physical Disk Failures
  • Part 4 (You’re here)
    • Removing a Disk from the Storage Pool
    • Reclaim Unused Space on Thin Provisioned Disks
    • Bonus: Defragmentation Attempt and Observations
    • Understanding Hot-Spare Behavior
    • Evaluating and Enabling Data Deduplication


Removing a Disk from the Storage Pool

At the moment, we have 4 disks in our pool. I’d like to reduce this to 3 disks. Scenario is that my virtual disk no longer needs that much space, and so I’ll delete some files and then see if I can remove a disk from the pool. I think you’ll find few things here quite interesting.

Current state: Remember that disk just went offline and will not accept any further writes to it (see screenshots earlier in Part 3). I can however, bring it online and then delete files. As I do this, I will check the health page of the virtual disk, see if some of the space on the disks are reclaimed. As this happens, I will make an attempt to remove the disk from the pool.

Action: Delete 20GB worth of files.

Before deletion:

After hard deletion of 20GB of files (didn’t make a silly recycle.bin type mistake here – just saying):

It would appear that deletions that happen at the volume level are not immediately (or perhaps ever – Update: see Part 5 on my learnings as it turns out reclaiming of space is possible) reflected on the thinly provisioned virtual disk. Let me attempt to remove Disk3 from the pool and see what happens.

I clicked on Yes, and this is what I got:

I know there is sufficient space to hold things together – but how do I vacate the disk? I did some research. The “Usage” property of physical disk needs to be changed, and then “Repair” operation needs to be run on the Virtual Disk. Note that setting the usage policy to “Retired” doesn’t actually vacate the disk. I have not found a way to do this from the graphical interface, so here how it’s done in PowerShell. I also have NOT been able to find a way to reduce the allocation footprint of a thinly provisioned virtual disk. That is, once you reached to a point, it doesn’t appear to ever go back. I will continue to research this but for now that’s my assumption.

Update (October 4, 2012): I have learnt (Thanks Nandu!) the ways to reduce allocation. See Part 5 for a special case to demonstrate reduction of storage allocation on a virtual disk.

Given that I am unable to reclaim the needed space right now, I will not be able to take out 1 disk just yet. I will need to bring in more total capacity and take 2 disks out. Specifically, the Disk5 from primordial is coming in, Disks 3 and 4 are going back to primordial. I am hoping to be able to achieve this by first setting usage policy on 3 and 4 as retired, then adding the disk5 to the pool. When I then run repair on the volume, data on 3 and 4 will transfer over to 5, I will then expect to be able to remove those disks from my pool. Let’s see if theory works.

Now I’m adding Disk5 to the pool. After these changes, and a refresh operation, here how my VirtualDisk1 is showing. Because I set two of the disks as retired, no new data can be written to them. However, I can read data off of the volume without any issue. Also note that despite adding Disk5 to the pool, Disk5 does not yet have any allocation showing under the virtual disk.

Next, we need to run the “Repair-VirtualDisk” command.

During repair process, you can see that Disk5 started to be utilized and retired disks are not showing. At this point I’m not sure if retired disks can simply be removed from the system or not. I will attempt to do so:

While repair job is still in progress, I am proceeding to remove disks3 and 4 from the pool – but look what happens. Because repair is still in progress, it’s preventing me from doing that. This is actually strange – because Virtual Disk Health properties clearly show Disks3 and 4 have no allocation on it whatsoever.

<I don’t know how long repair took – I resumed after a day or so and it was done>

Take a quick look at the state of our virtual disk. If you notice, status is reporting healthy and that disks3 and 4 are not in use. This should be sufficient for me to do the removal. Let’s check…

Action: Remove Disk3

This time it proceeded to remove, and displayed this message:

I don’t think it’s actually doing any lengthy repair tasks as the disk had no content for this virtual disk. Quick “refresh” confirms this. Disk is not in repair mode and removal appears to be successful. I did the same for Disk4 and here where we are now:

Primordial disks look like this:

So what did we learn here?

  • Thin provisioned Virtual Disk only expands its footprint, never shrinks. I say this based on pure observation. If there is some PowerShell magic that does offline maintenance or something, I don’t know. If I do learn something new, I’ll come back and update. For now, it only appears to expand. This means that temporary file additions to thin provisioned disks should be carefully planned. See Part 5 for a test case that shows how footprint reduction is done.
  • Removal of disk from a pool is possible, but requires retire-repair-remove cycle as I have demonstrated above. You must provide at least same amount of capacity and at least 3 columns per virtual disk in order to be able to remove an existing disk from a pool. This method will preserve parity protection in case you lose a physical disk while performing this maintenance. I would avoid pull-addNew-repair method as you’re risking complete data loss until repair is complete.
  • In Windows Server 2012 RTM, it does appear that the dismount-due-to-pool-full behavior is recoverable in that the Virtual Disk stays mounted (unlike Release Preview version) if no writes are attempted to it. This statement needs time-testing with different data sets – so if you do repro a situation where you cannot mount a virtual disk that is full, drop me a comment with your details and I’ll attempt to replicate your scenario. It’s very critical that without additional physical disk we should be able to at least read the data out of our virtual disks. For the RTM version of Windows Server 2012, my experience shows that we indeed can mount & read everything from it.


Continue reading additional cases in Part 5.

6 replies »

  1. This seams is only working if you use at least Mirror. I have a Storage Pool with a large Simple volume, and tried to replace one Drive with a larger one. I was not able to trigger the repair process. I set the old drive to Retired but if I type Repair-Virtualdisk… nothing happens and no Jobs are running.

    (great article btw helped me a lot to understand the storage pool)

    • Thanks for the note — it’s strange that repair is not kicking in once you retire the disk with the data on it.

      Keep in mind, repair type processes are sensitive to having actual data on it. If you’re working on empty volumes, activities might happen too quickly for you to notice.

      For example, after having run the repair, when you go to properties of the virtual disk, under Health section, do you see the retired disk still carrying data for it? It shouldn’t (which would mean it’s OK to remove that disk from the vDisk and then from the pool)

      • no The disk is 100% full (1TB) but I added two 3TB Disks to the pool so more than enough free space is available to replace the old one. My plan was to replace the old Drives with new low power versions.

        My current attempt is:
        I added another Simple (Thin) volume with the same capacity and move all the data from the old to the new, hopefully the pool is smart enough and uses not longer the retired Disks.

  2. Hi,
    I have 2012R2 in place, have build a Storage Pool with 5 2 TB Disks and use 3 virtual disks on it. All are with parity. One für my disk images, one für backup images and one with the most important data…
    This was the best, i thought I can do for data security. But now, 1 drive is defect and lost connection. Since I have every virtual disk with parity it should be possible to set the lost disk to retire, replace it with a new one and start repair virtual disks. But here is my problem. Even that I have inserted a new disk also with 2 TB I cannot repair anything because of having not enough free space 😦
    So I removed the 2 TB disk and replaced it with a 4 TB one. Same Problem (not enough space). Even when I add 2 disks with 4 TB, there is also not enough space to repair. I cannot understand it. My Volume with the most important things is only 1 TB (760GB only used). Any idea?

    • Sorry for late response here — been really busy. Have you resolved your issue? If not, can you provide outputs of “get-storagepool | fl” and “get-virtualdisk | fl” and I’ll take a look.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s