0
votes

I have a question regarding WMI and Storage Spaces.

Setup: I have created a Storage Pool that contains a virtual disk that in turn contains 3 physical disks. I am using parity, which requires me to have a minimum of three disks to create the virtual disk. I am using C# on a Windows 8 machine using VS 2012.

Problem: I plug a fourth disk into the machine and try to add it to the virtual disk using WMI. The AddPhysicalDisk method returns a 'cache out of date (40003)' error. I am querying and retrieving an instance of the MSFT_VirtualDisk only after I receive the event and this is the first operation I am performing on it. Could someone tell me why this error is occurring?

Other data: I have tried to use the same physical disk to expand the pool instead of the Virtual Disk and this works fine. The problem with that approach is that I can't expand the virtual disk to take that additional disk into the picture.

2

2 Answers

1
votes

"with two 1TB HDDs with mirroring "

Here's the catch, you're creating a mirrored vDisk.
When creating a mirror SSP will stripe across all physical disks using a stripe set with n columns. The reason "n columns" is important is that if you want to add more disks to the set, you need to match the number of columns to do it. Check the number of columns by looking at the properties of the vDisk. Then use this little formula:

"minimum no of disks to extend the set" = n columns * n data copies

So if you create a mirror with 2 disks you will end up with 1 column and 2 data copies, hence to extend this set you need to provide 1*2=2 disks. That's why you cannot extend it to 1.5TB when adding a 3rd disk, you need to add 2 new disks to extend it.

0
votes

There are several things that you could try:

  • Have you added this 4th physical disk to the storage pool using the "AddPhysicalDisk" method? If not, you must add it to the pool. This is how Storage Spaces knows that it is OK to use the disk.
  • Did you create the VirtualDisk using the "PhysicalDisksToUse" parameter? If yes, you still need to add it to the pool first. Once in the pool, then try using AddPhysicalDisk on the virtual disk.

Note that PhysicalDisksToUse is a way to further restrict allocations within a pool. If you want your virtual disk to automatically use all available storage, omit this parameter when creating the virtual disk.

Judging by the error code (which can sometimes be treated as "not found"), you have probably not added the physical disk to the pool first.