dell / PyU4V

PyU4V is a Python module that simplifies interaction with the Unisphere for PowerMax REST API. It wraps REST calls with simple APIs that abstracts the HTTP request and response handling.
Apache License 2.0
41 stars 37 forks source link

Add standalone volume #165

Closed ransa808 closed 1 year ago

ransa808 commented 1 year ago

Hi, I couldn't post in discussions for some reason so excuse for asking here. Is it possible to add a standalone volume (not a member of a storage group) ? if so how?

Thanks

rawstorage commented 1 year ago

Yes there is an add volume to storage group function and add existing volume to storage group function. If you search the read the docs you should be able to find. I can post names here later if you have trouble finding them


From: ransa808 @.> Sent: Monday, April 3, 2023 1:15:34 PM To: dell/PyU4V @.> Cc: Subscribed @.***> Subject: [dell/PyU4V] Add stadlone volume (Issue #165)

[EXTERNAL EMAIL]

Hi, I couldn't post in discussions for some reason so excuse for asking here. Is it possible to add a standalone volume (not a member of a storage group) ? if so how?

Thanks

— Reply to this email directly, view it on GitHub [github.com]https://urldefense.com/v3/__https://github.com/dell/PyU4V/issues/165__;!!LpKI!hS12HZMhBrJKUywt-Pz3IKOt3nYJPBbr0u7PKLTHCG22-Mu0FC9w0O7lU5jp4fp1eXcidy2qMuqeSUKlaM4IfCHm$, or unsubscribe [github.com]https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AF7FWPP53NLGFAQ3KTAKEPLW7K5ONANCNFSM6AAAAAAWRHN4NM__;!!LpKI!hS12HZMhBrJKUywt-Pz3IKOt3nYJPBbr0u7PKLTHCG22-Mu0FC9w0O7lU5jp4fp1eXcidy2qMuqeSUKlaMzbNQdE$. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ransa808 commented 1 year ago

Yes there is an add volume to storage group function and add existing volume to storage group function. If you search the read the docs you should be able to find. I can post names here later if you have trouble finding them

My goal is to create a volume that is not a member of any storage group, is it possible via the api?

rawstorage commented 1 year ago

no, you must use a storage group to create a volume with the API

Can I ask why you want to create a volume outside storage group structure?

rawstorage commented 1 year ago

closing as this is not supported in the API

ransa808 commented 1 year ago

I'm trying to add a volume to an existing SG which has SRDF replicated volumes, I get the following error message : invalid input [this will render the storage group srdf unmanagable. Force flag is needed to continue.

Is there any other solution or workaround to create a new volume and add it to such SG ?

ransa808 commented 1 year ago

no, you must use a storage group to create a volume with the API

Can I ask why you want to create a volume outside storage group structure?

Can you re-open please?

I'm trying to add a volume to an existing SG which has SRDF replicated volumes, I get the following error message : invalid input [this will render the storage group srdf unmanagable. Force flag is needed to continue.

Is there any other solution or workaround to create a new volume and add it to such SG ?

rawstorage commented 1 year ago

i've re-opened but the error is clear, it's not a PyU4V issue you are having, the issue is you are trying to add volumes to a protected storage group without following the protection workflow, you need to provide the additional parameters to provide details for where to protect, this is a protection mechanism in the API you will get the same error in GUI.

rawstorage commented 1 year ago

Per documentation for add_new_volume_to_storage_group https://pyu4v.readthedocs.io/en/latest/PyU4V.html?highlight=add_new_volume_to_storage_group#PyU4V.provisioning.ProvisioningFunctions.add_new_volume_to_storage_group

:param remote_array_1_id: 12 digit serial number of remote array, optional -- str :param remote_array_1_sgs: list of storage groups on remote array to add Remote device, Unisphere instance must be local to R1 storage group otherwise volumes will only be added to the local group -- str or list

These parameters are the ones you provide when adding volumes to SRDF protected storage group, on the assumption you want to protect them. If you want to force add them then that's up to you but it will make the storage group unmanageable as per the message, you can provide the force flag to the API call but you will need to make a custom API call for that as PyU4V doesn't have these flags added to the functions to protect customers from breaking things in an automated way. We should really be following the rules and not trying to force anything outside of the happy path workflows. https://pyu4v.readthedocs.io/en/latest/quick_start.html#perform-a-custom-rest-call-in-pyu4v