dsccommunity / StorageDsc

DSC resource module is used to manage storage on Windows Servers.
https://dsccommunity.org
MIT License
69 stars 51 forks source link

Disk: Fix Partition MaxSize discrepency - Fixes #181 #213

Closed PlagueHO closed 4 years ago

PlagueHO commented 4 years ago

Pull Request (PR) description

This PR introduces a workaround that fixes issue #181 where the reported maximum supported size of a partition would be approximately 1MB bigger than the actual size of the partition. As long as it is unclear why the New-Partition and Get-PartitionSupportedSize cmdlets report different data if neither Offset nor Alignment parameters are used, this workaround should remain in place.

If this is not the case, Test-TargetResource for a disk configured to use the remaining size will always return false and trigger an endless cycle of LCM runs.

This PR replaces #197.

This Pull Request (PR) fixes the following issues

Task list

@johlju - would you mind reviewing when you have a moment?


This change is Reviewable

codecov-io commented 4 years ago

Codecov Report

Merging #213 into dev will increase coverage by <1%. The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##           dev   #213    +/-   ##
===================================
+ Coverage   95%    95%   +<1%     
===================================
  Files        7      7            
  Lines      978    980     +2     
===================================
+ Hits       937    939     +2     
  Misses      41     41