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 - Feature Request - Destructive Switch #50

Open
pshellguruwannabe opened this Issue Aug 19, 2016 · 3 comments

Comments

Projects
None yet
5 participants
@pshellguruwannabe

pshellguruwannabe commented Aug 19, 2016

Would it be possible to add a Destructive switch to the schema so that existing partitions/volumes could be destroyed with Clear-Disk.

Thanks.

@PlagueHO

This comment has been minimized.

Show comment
Hide comment
@PlagueHO

PlagueHO Sep 28, 2016

Collaborator

@TravisEz13 suggested that the switch should be "AllowDestructive"

Collaborator

PlagueHO commented Sep 28, 2016

@TravisEz13 suggested that the switch should be "AllowDestructive"

@nyanhp

This comment has been minimized.

Show comment
Hide comment
@nyanhp

nyanhp May 17, 2017

Contributor

Hi @pshellguruwannabe , the issue is quite old but I recently got into resource development and wanted to clarify this parameter. An AllowDestructive switch itself would not mean that the partition schema is always removed when the set method is executed. At the moment it would merely mean that operations that might be destructive like partition resizing would be made possible.

I will likely include another new parameter called ClearDisk to indicate that the entire partition schema of the target disk will be discarded whenever Set-TargetResource is entered (which will likely result in data loss). Is this what you had in mind? This equals Clear-Disk -RemoveData -RemoveOEM whenever Test-TargetResource returns false.

Contributor

nyanhp commented May 17, 2017

Hi @pshellguruwannabe , the issue is quite old but I recently got into resource development and wanted to clarify this parameter. An AllowDestructive switch itself would not mean that the partition schema is always removed when the set method is executed. At the moment it would merely mean that operations that might be destructive like partition resizing would be made possible.

I will likely include another new parameter called ClearDisk to indicate that the entire partition schema of the target disk will be discarded whenever Set-TargetResource is entered (which will likely result in data loss). Is this what you had in mind? This equals Clear-Disk -RemoveData -RemoveOEM whenever Test-TargetResource returns false.

@TravisEz13

This comment has been minimized.

Show comment
Hide comment
@TravisEz13

TravisEz13 May 17, 2017

Member

AllowDestructive should not mean always, but that a destructive operation is allowed when Set-TargetResource is called.

Member

TravisEz13 commented May 17, 2017

AllowDestructive should not mean always, but that a destructive operation is allowed when Set-TargetResource is called.

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

Merge pull request #90 from nyanhp/feature/VolumeResize
Partition resize and destructive switch implemented. Fixes #11, #50 and #89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment