2

I am trying to understand how Storage Spaces works when it comes to available space in Parity spaces. I have set up a pool, created a space, and moved about 20 GiB of data onto it. Then I have deleted the data, emptied the bin and optimized usage in Storage Spaces UI. It currently still shows, that about ~50 GiBs are being used. Why is that?

Here's the storage spaces setup: Storage Spaces Setup

Here's the dialog showing usage: Dialog about space usage

1
  • 299 MB usage is a rounding error when you dealing with 3.62 TB total space.
    – Ramhound
    Commented Nov 18, 2019 at 0:59

1 Answer 1

1

I don’t have a lot of experience with Storage Spaces. But what this looks like to me is a misinterpretation of drive space usage on a virtual disk, commonly associated with “thin provisioning.”

In the first image, you show a storage pool usage of nearly 50GB, which represents the total physical space used on the underlying hardware.

In the second image, you show only 200MB used of a virtual volume that was carved out of the available physical storage pool.

A 3.62TB thinly provisioned virtual disk will only use a small amount of the underlying physical storage. When you begin adding data to the virtual disk, the underlying physical storage will increase in usage to grow with the storage used on the virtual disk. In this way, you can over provision thinly provisioned disks so that you can actually have several virtual disks that are, in total, larger than the physically available storage.

However, as a result of the thinly provisioned disk, the underlying physical storage needed will only grow and never shrink. This is because sections of the physical storage have been allocated to the virtual disk, even if the storage on the virtual disk has been erased. Think about how a deleted file can actually be recovered by scanning a disk. Just because you are only using 200MB doesn’t mean that 50GB of the “freed space” doesn’t still contain data. Eventually the virtual disk will consume the entirety of the allocated space on the physical storage regardless of how much storage is actually used on the virtual disk.

To free the physical storage space it is necessary for the virtual disk to both release the unused sectors (thru TRIM and UNMAP commands) to the underlying storage and for the physical storage to be released and possibly defragmented to consolidate the still used storage to a single contiguous block. This is called dead space reclamation.

In this case, it looks like the following command, in an administrative Powershell, and linked website can help your situation. This command will release the unused sectors on the virtual disk and release the “unused” slabs back to the storage space pool.

Optimize-Volume -DriveLetter D: -ReTrim -SlabConsolidate -Verbose

https://docs.microsoft.com/en-us/powershell/module/storage/optimize-volume?view=win10-ps

I can’t find any documentation on the subject to indicate that freeing the underlying storage space usage is actually possible. It is possible that there is no way to release the underlying storage space once it is provisioned, unless you create a new virtual disk and copy the data over. Even then, a thinly provisioned disk will always grow again. The best solution in this scenario is to simply allocate a fixed space virtual disk so that there is no discrepancy between virtual disk size and used physical space.

Here’s a bit more reading on the subject: https://www.itprotoday.com/windows-78/navigating-storage-spaces-and-pools

https://linustechtips.com/main/topic/493971-storage-space-issues-with-server-2012-r2/

2
  • Would it be sufficient to compare this with, for instance, a virtual hard drives in Virtualization software (i.e. VirtualBox), that are "dynamic", meaning they only grow, but never shrink? Same principle?
    – masiton
    Commented Nov 18, 2019 at 11:32
  • I've read the links, especially the ITProToday is exactly the kind of explanation I needed. Thanks!
    – masiton
    Commented Nov 18, 2019 at 11:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .