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

Error in xDiskAccessPath when max size used and disk partitioned and formatted but not mounted #103

Closed
PlagueHO opened this Issue Jun 21, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@PlagueHO
Collaborator

PlagueHO commented Jun 21, 2017

The following error occurs when a disk already contains a partition and is formatted but the size of the partition is not specified but it is not mounted.

VERBOSE: [LABSERVER02]: LCM:  [ Start  Set      ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]
VERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Setting disk with Number '4' status for access path 'C:\MountPoint\SQLDATA01'.
VERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Checking disk with Number '4' partition style.
VERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Disk with Number '4' is already initialized with GPT.
VERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Disk with Number '4' does not contain a partition assigned to access path 'C:\MountPoint\SQLDATA01\'.
VERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Creating partition on disk with Number '4' using all free space.
Invoke-CimMethod : Not enough available capacity
At C:\DSC\SQLTest.ps1:20 char:5
+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (StorageWMI:) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : StorageWMI 40000,New-Partition,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand
    + PSComputerName        : LABSERVER02
 
VERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Volume assigned to access path 'C:\MountPoint\SQLDATA01\' filesystem format '' does not match expected format 'NTFS'.
VERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Changing Volume assigned to access path 'C:\MountPoint\SQLDATA01\' label to 'SQLDATA01'.
Invoke-CimMethod : Cannot validate argument on parameter 'PartitionNumber'. The argument is null. Provide a valid value for the argument, and then try running the command again.
At C:\DSC\SQLTest.ps1:20 char:5
+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-CimMethod], CimException

@Froosh

This comment has been minimized.

Show comment
Hide comment
@Froosh

Froosh Aug 11, 2017

A similar error occurs in xDisk, for exactly the same reason.

Froosh commented Aug 11, 2017

A similar error occurs in xDisk, for exactly the same reason.

@PlagueHO

This comment has been minimized.

Show comment
Hide comment
@PlagueHO

PlagueHO Aug 11, 2017

Collaborator

I have some time this weekend and I'll try and finally resolve this issue (in both xDisk and xDiskAccessPath). I have had quite a lot on the backlog recently 😢

Collaborator

PlagueHO commented Aug 11, 2017

I have some time this weekend and I'll try and finally resolve this issue (in both xDisk and xDiskAccessPath). I have had quite a lot on the backlog recently 😢

@Zuldan

This comment has been minimized.

Show comment
Hide comment
@Zuldan

Zuldan Aug 22, 2017

@PlagueHO I ran into this little nasty again today. On another note I wonder if it's worth adding the following two properties to xDiskAccessPath to bring it in-line with xDisk.

[Write, Description("Specifies if potentially destructive operations may occur.")] Boolean AllowDestructive;
[Write, Description("Specifies if the disks partition schema should be removed entirely, even if data and oem partitions are present. Only possible with AllowDestructive enabled.")] Boolean ClearDisk;

Zuldan commented Aug 22, 2017

@PlagueHO I ran into this little nasty again today. On another note I wonder if it's worth adding the following two properties to xDiskAccessPath to bring it in-line with xDisk.

[Write, Description("Specifies if potentially destructive operations may occur.")] Boolean AllowDestructive;
[Write, Description("Specifies if the disks partition schema should be removed entirely, even if data and oem partitions are present. Only possible with AllowDestructive enabled.")] Boolean ClearDisk;

@PlagueHO

This comment has been minimized.

Show comment
Hide comment
@PlagueHO

PlagueHO Dec 9, 2017

Collaborator

Sorry this one has taken me so long to get onto! I've put together the integration tests that are currently failing for this one and I'll work on making the pass tomorrow.

Collaborator

PlagueHO commented Dec 9, 2017

Sorry this one has taken me so long to get onto! I've put together the integration tests that are currently failing for this one and I'll work on making the pass tomorrow.

@PlagueHO

This comment has been minimized.

Show comment
Hide comment
@PlagueHO

PlagueHO Dec 10, 2017

Collaborator

@Zuldan , @Froosh - sorry about the delay on this one. I've completed the fix and submitted it for merge. Hopefully this one will be complete soon.

Collaborator

PlagueHO commented Dec 10, 2017

@Zuldan , @Froosh - sorry about the delay on this one. I've completed the fix and submitted it for merge. Hopefully this one will be complete soon.

@Zuldan

This comment has been minimized.

Show comment
Hide comment
@Zuldan

Zuldan Dec 10, 2017

No problem at all mate. Your time and effort is greatly appreciated.

Zuldan commented Dec 10, 2017

No problem at all mate. Your time and effort is greatly appreciated.

PlagueHO added a commit that referenced this issue Dec 11, 2017

Merge pull request #130 from PlagueHO/Issue-103
Fix when max size used and disk partitioned and formatted but not mounted - Fixes #103
@PlagueHO

This comment has been minimized.

Show comment
Hide comment
@PlagueHO

PlagueHO Dec 11, 2017

Collaborator

@Zuldan , @Froosh - this has now been resolved and merged. It should be released in the next Resource Kit release in a couple of weeks. Thank you both for your patience! 😁

Collaborator

PlagueHO commented Dec 11, 2017

@Zuldan , @Froosh - this has now been resolved and merged. It should be released in the next Resource Kit release in a couple of weeks. Thank you both for your patience! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment