I'm trying to attach a storage space in my server but am receiving and access denied error. The back story is that the storage space was working fine on windows home server 2012, but then I paved the system drive (not part of the storage space) and installed a fresh copy of WHS2012 R2. The storage space no longer appears to be available. Any idea how the permissions can be fixed?
PS C:\Users\Admin> get-virtualdisk
FriendlyName ResiliencySettingNa OperationalStatus HealthStatus IsManualAttach Size
me
------------ ------------------- ----------------- ------------ -------------- ----
Documents Mirror Detached Unknown True 1.81 TB
PS C:\Users\Admin> connect-virtualdisk -FriendlyName "Documents"
connect-virtualdisk : Access denied
At line:1 char:1
+ connect-virtualdisk -FriendlyName "Documents"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (StorageWMI:ROOT/Microsoft/...SFT_VirtualDisk) [Connect-VirtualDisk],
CimException
+ FullyQualifiedErrorId : StorageWMI 40001,Connect-VirtualDisk
EDIT: For those coming after me, see this artcle: http://windowsitpro.com/systems-management/q-after-i-reinstalled-windows-server-2012-my-storage-spaces-are-no-longer-writabl
Note the important step about set-virtualdisk -IsManualAttach $False to get the storage space to automatically show up.
Can you confirm that the storage pool is not set to read-only mode? Windows seems to mark the storage pools and virtual disks as read only when it detects the pool has moved from the OS that made it.
This should return storage pool attributes:
Get-Storagepool | fl *
If the IsReadOnly attribute is set to true you should be able to change that in powershell through:
Set -StoragePool -FriendlyName -IsReadOnly $false
This has allowed me to access virtual disks that have since moved between servers in the past.
** This is something I've only done when I've moved disks from one 2012R2 system to another with the intention of reusing the disks but forgot to delete the virtual disk/storage pool before moving the disks. By setting the read only flag to false I've been able to get past the storage spaces protection on the disks to format them. I HAVE NOT had the need to preserve any data between the move and thus have not checked data integrity after performing those steps.
The original thread I followed when I encountered access problems:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/917aab3a-4e56-4dbe-af2d-2374facd71f8/migrate-storage-pool-between-servers?forum=winserver8gen