-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple Formatting Drive Failing via StorageDsc 4.1.0.0 #172
Comments
Hi @ronhowe - it looks like there is some problem with What is the result if you run the following PowerShell command on the DSC target machine: Get-Partition -DiskNumber 1 | Get-PartitionSupportedSize |
|
The same commands works on our QA box.
They're the same OS, same PowerShell, same DSC configuration. The only difference is the size of the E$. In QA it is ~8 GB. In Production it is ~50 GB. |
More debugging. I deleted the volume and offlined the disk. I re-ran the current configuration and it completed successfully. I re-ran the current configuration again and it now fails on that test of the drive. To reiterate, it's actually implementing correctly. It appears to just be failing consistency tests after the fact. |
Relevant DSC Operations entries in the event log. Log Name: Microsoft-Windows-DSC/Operational Log Name: Microsoft-Windows-DSC/Operational Log Name: Microsoft-Windows-DSC/Operational Log Name: Microsoft-Windows-DSC/Operational Log Name: Microsoft-Windows-DSC/Operational |
LOL WOW I found this article in Japanese and used Bing to translate it to English. In essence, the "Optimize drives" service (defragsvc) can not be set to Startup = Disabled as this server was. It has to be set to Manual (or "higher"). I did this and it worked. Freaking crazy. Time to add DSC to ensure this service is set correctly before implementing storage configurations. |
@ronhowe That is some awesome detective work! Sounds like the documentation for the resource should be updated with this as a requirement. |
Added 'defragsvc' service conflict known issue to README.MD for Disk - Fixes #172
#### Details of the scenario you tried and the problem that is occurring
We have had the same implementation in DSC configuration for a long time and it has worked on many servers. In this last version of the DSC Resource Kit including StorageDsc 4.1.0.0 provisioning a new server, we're now getting errors formatting the E$ drive. The Disk 1 gets mounted and a volume is created. The drive actually does get formatted and later configuration is creating files and folders there. However, Test-* is failing for some reason so overall the configuration is deemed to be failing.
#### Verbose logs showing the problem
VERBOSE: [SAASMANAGE01]: LCM: [ Start Resource ] [[Disk]FormatEDrive]
VERBOSE: [SAASMANAGE01]: LCM: [ Start Test ] [[Disk]FormatEDrive]
VERBOSE: [SAASMANAGE01]: [[Disk]FormatEDrive] Test-TargetResource: Testing disk with Number '1' status for drive letter 'E'.
VERBOSE: [SAASMANAGE01]: [[Disk]FormatEDrive] Test-TargetResource: Checking if disk with Number '1' is initialized.
Failed
Activity ID: {88a8fe9c-f006-47f4-b9d4-8b7516fb9d95}
+ CategoryInfo : NotSpecified: (StorageWMI:) [], CimException
+ FullyQualifiedErrorId : StorageWMI 4,Get-PartitionSupportedSize
+ PSComputerName : localhost
VERBOSE: [SAASMANAGE01]: [[Disk]FormatEDrive] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT BlockSize from Win32_Volume WHERE DriveLetter =
'E:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [SAASMANAGE01]: [[Disk]FormatEDrive] Operation 'Query CimInstances' complete.
VERBOSE: [SAASMANAGE01]: LCM: [ End Test ] [[Disk]FormatEDrive] in 1.0620 seconds.
The PowerShell DSC resource '[Disk]FormatEDrive' with SourceInfo 'C:\VisualStudio\IDIBilling\IDI_IDI\Infrastructure\DesiredStateConfiguration\Implementations\IDI\Configuration\Configuration.psm1::1500::13::Disk' threw
one or more non-terminating errors while running the Test-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : localhost
#### The DSC configuration that is used to reproduce the issue (as detailed as possible)
#### The operating system the target node is running
OsName : Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture : 64-bit
WindowsBuildLabEx : 14393.447.amd64fre.rs1_release_inmarket.161102-0100
OsLanguage : en-US
OsMuiLanguages : {en-US}
#### Version and build of PowerShell the target node is running
Name Value
PSVersion 5.1.14393.206
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.206
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
#### Version of the DSC module that was used ('dev' if using current dev branch)
StorageDsc 4.1.0.0
The text was updated successfully, but these errors were encountered: