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

xDisk resource does not support resizing an existing partition #11

Closed
nebffa opened this Issue Oct 26, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@nebffa

nebffa commented Oct 26, 2015

If you do something like:

Configuration Server
{
    Import-DSCResource -Name xWaitforDisk -Module xStorage
    Import-DSCResource -Name xDisk -Module xStorage

    Node "perftest01"
    {
        xWaitforDisk Disk2
        {
            DiskNumber = 1
            RetryIntervalSec = 60
            RetryCount = 10
        }

        xDisk DVolume
        {
            DiskNumber = 1
            DriveLetter = 'D'
            Size = 1GB
        }
    }
}

Server
Start-DscConfiguration -Force -Verbose -Wait -path .\Server

followed by

Configuration Server
{
    Import-DSCResource -Name xWaitforDisk -Module xStorage
    Import-DSCResource -Name xDisk -Module xStorage

    Node "perftest01"
    {
        xWaitforDisk Disk2
        {
            DiskNumber = 1
            RetryIntervalSec = 60
            RetryCount = 10
        }

        xDisk DVolume
        {
            DiskNumber = 1
            DriveLetter = 'D'
            Size = 10GB
        }
    }
}

Server
Start-DscConfiguration -Force -Verbose -Wait -path .\Server

(note that the only difference is the size specified for DVolume)

The DSC run will fail:

VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer PERFTEST01 with user sid
S-1-5-21-1778218145-2021600166-3147052739-5183.
VERBOSE: [PERFTEST01]: LCM:  [ Start  Set      ]
VERBOSE: [PERFTEST01]: LCM:  [ Start  Resource ]  [[xWaitForDisk]Disk2]
VERBOSE: [PERFTEST01]: LCM:  [ Start  Test     ]  [[xWaitForDisk]Disk2]
VERBOSE: [PERFTEST01]:                            [[xWaitForDisk]Disk2] Checking for disk '1' ...
VERBOSE: [PERFTEST01]:                            [[xWaitForDisk]Disk2] Found disk 'HP LOGICAL VOLUME SCSI Disk
Device'.
VERBOSE: [PERFTEST01]: LCM:  [ End    Test     ]  [[xWaitForDisk]Disk2]  in 1.6720 seconds.
VERBOSE: [PERFTEST01]: LCM:  [ Skip   Set      ]  [[xWaitForDisk]Disk2]
VERBOSE: [PERFTEST01]: LCM:  [ End    Resource ]  [[xWaitForDisk]Disk2]
VERBOSE: [PERFTEST01]: LCM:  [ Start  Resource ]  [[xDisk]DVolume]
VERBOSE: [PERFTEST01]: LCM:  [ Start  Test     ]  [[xDisk]DVolume]
VERBOSE: [PERFTEST01]:                            [[xDisk]DVolume] Checking if disk number '1' is initialized...
VERBOSE: [PERFTEST01]:                            [[xDisk]DVolume] Drive D size does not match expected value. Current:
 1073741824 Expected: 524288000
VERBOSE: [PERFTEST01]: LCM:  [ End    Test     ]  [[xDisk]DVolume]  in 0.2350 seconds.
VERBOSE: [PERFTEST01]: LCM:  [ Start  Set      ]  [[xDisk]DVolume]
VERBOSE: [PERFTEST01]:                            [[xDisk]DVolume] Checking existing disk partition style...
VERBOSE: [PERFTEST01]:                            [[xDisk]DVolume] Disk number '1' is already configured for 'GPT'
VERBOSE: [PERFTEST01]:                            [[xDisk]DVolume] Creating the partition...
VERBOSE: [PERFTEST01]:                            [[xDisk]DVolume] Formatting the volume...
The requested access path is already in use.
    + CategoryInfo          : InvalidArgument: (StorageWMI:) [], CimException
    + FullyQualifiedErrorId : StorageWMI 42002,New-Partition
    + PSComputerName        : perftest01

VERBOSE: [PERFTEST01]: LCM:  [ End    Set      ]  [[xDisk]DVolume]  in 5.6560 seconds.
The PowerShell DSC resource MSFT_xDisk threw one or more non-terminating errors while running the Set-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        : perftest01

VERBOSE: [PERFTEST01]: LCM:  [ End    Set      ]
The SendConfigurationApply function did not succeed.
    + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName        : perftest01

VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 8.485 seconds
@PlagueHO

This comment has been minimized.

Show comment
Hide comment
@PlagueHO

PlagueHO Aug 23, 2016

Collaborator

I'll look into this once #53 is complete.

Collaborator

PlagueHO commented Aug 23, 2016

I'll look into this once #53 is complete.

@PlagueHO

This comment has been minimized.

Show comment
Hide comment
@PlagueHO

PlagueHO Aug 30, 2016

Collaborator

This one is possible but I think it will require implementation of a "Destructive" switch on the resource. The switch would allow destructive adjustments on the disk to be performed.

It is related to #50 and #54 if a reformat would be allowed.

Collaborator

PlagueHO commented Aug 30, 2016

This one is possible but I think it will require implementation of a "Destructive" switch on the resource. The switch would allow destructive adjustments on the disk to be performed.

It is related to #50 and #54 if a reformat would be allowed.

@nyanhp

This comment has been minimized.

Show comment
Hide comment
@nyanhp

nyanhp May 6, 2017

Contributor

Hi @PlagueHO , are you still looking into this? If not I would like to take over this one as I also have customers who encounter this issue. Additionally, I plan on adding a parameter like FillRemainingFreeSpace since this is also a very common scenario.

Contributor

nyanhp commented May 6, 2017

Hi @PlagueHO , are you still looking into this? If not I would like to take over this one as I also have customers who encounter this issue. Additionally, I plan on adding a parameter like FillRemainingFreeSpace since this is also a very common scenario.

@PlagueHO

This comment has been minimized.

Show comment
Hide comment
@PlagueHO

PlagueHO May 6, 2017

Collaborator

Hi @nyanhp - I'm creating some new resources (xDiskEx, xPartition and xVolume) that allow far more control over disk provisioning. See #81. xDisk does not handle many more complicated disk partitioning scenarios. But I've not had time to complete these (and I won't for another few weeks).

That said, if you want to get xDisk to enable partition resizing, then I'm all for it! 😁

I've just got lots of reviews backed up so haven't had much time to put into new resources or features. But if you do have the time - then it is greatly appreciated!

Collaborator

PlagueHO commented May 6, 2017

Hi @nyanhp - I'm creating some new resources (xDiskEx, xPartition and xVolume) that allow far more control over disk provisioning. See #81. xDisk does not handle many more complicated disk partitioning scenarios. But I've not had time to complete these (and I won't for another few weeks).

That said, if you want to get xDisk to enable partition resizing, then I'm all for it! 😁

I've just got lots of reviews backed up so haven't had much time to put into new resources or features. But if you do have the time - then it is greatly appreciated!

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