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.
There are several things that you could try:
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.