-
Notifications
You must be signed in to change notification settings - Fork 8
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
Need to be able to remove Initiator Groups from volume #4
Comments
There is a Remove-NSInitiatorFromGroup to remove them. |
That cmdlet - based on the help - looks to remove an IP or IQN from an initiator group... I need to change the ACL of a volume by removing an initiator group. |
Do a gcm remove* -module nimble I think there is another one without the "from"in the name that I think will do what you need |
There is another - Remove-NSInitatorGroup I can't delete and re-create the initiator group, because that would kill the VMware environment. |
I'll have to dig in to it a bit more. I no longer have access to a unit so it's a bit tough, but I'll take a look at the api |
Thanks! |
It's just the format of the comment at the top of the function
|
So I have a Get-NSVolumeACL which really all it does is look at the acllist property of a volume. I dont have a good way to check this, but if you check its type you might be able to just use a remove() on it
With this you could then create a function called Remove-NSACL Now that we have this conversation I feel like the names should be different... I'll have to give this some thought... |
Hi Justin,
So... |
Almost, initiatorgrp Property string initiatorgrp {get;set;} That indicates its a property of type string so there is no Set() method and you'll have to test this because there may be an array in there some place but try out
If that works to return what you'd expect then set it
Depending on how all this works, if that fails you might need to try setting it to "" It might not matter, and cast ok, but depending on how things go, that should be enough info to help you solve the problem. |
Hi Justin, I always get
I noticed that if I Is there a way to create an empty VolAclRec to replace the current one? Thanks, |
hmm let me just start from the top.. you want to just remove the init group $rtncode = $Script:NSUnit.addVolAcl($script:sid.value,$Volume,$applyto ,"*", https://github.com/jrich523/NimblePowerShell/blob/master/Initiator.ps1#L318 you'll see that we're adding the whole group to a volume and picking an This is done with a method, addVolAcl, which would make me think there is a so if you were to build a local one, $unit = new-object groupmgmt $unit | gm | ? {$_.name -like "acl"} we'll see there is a similar remove, removeVolAcl(string sid, string volname, Nimble.SmVolAclApply applyTo, So this takes some of the same info. You'll want to verify that whatever is On Tue, Oct 14, 2014 at 3:31 PM, Clint McGuire [email protected]
|
Hi Justin,
I can't figure out how to remove an initiator group from a volume.
It looks like the remove-nsinit* cmdlets modify initiator groups, not volumes. (Am I reading this wrong?)
I tried:
Add-NSInitiatorGroupToVolume -InitiatorGroup $initgroup -Volume $datavolume -Access none
But got an error that -Access can't be none.
Is there another way to accomplish this using the module?
Thanks!
Clint
The text was updated successfully, but these errors were encountered: