This post is more than 5 years old
5 Posts
0
3397
rename storage view via CLI?
Hi all,
is there a way to rename a storage view via CLI or REST API? Seems easy in the GUI.
background: I work on a procedure where many hosts are being migrated between locations and new storage-views are being created. I just want to save obsolete views under a new name as a fallback precaution.
thanks in advance
Joachim Gann
garyo
89 Posts
0
May 27th, 2014 15:00
Hi Joachim,
Here's instructions on how to change a storage-view name in the CLI:
I have two storage-views on my test system:
VPlexcli:/clusters/cluster-1/exports/storage-views> ls
esx_storage_view federation_storage_view
To change the name (among other properties) you need to use the "::" to set the property:
VPlexcli:/clusters/cluster-1/exports/storage-views> set esx_storage_view:: (Hit tab for tab completions)
esx_storage_view::caw-enabled esx_storage_view::controller-tag
esx_storage_view::initiators esx_storage_view::name
esx_storage_view::operational-status esx_storage_view::port-name-enabled-status
esx_storage_view::ports esx_storage_view::virtual-volumes
esx_storage_view::write-same-16-enabled esx_storage_view::xcopy-enabled
Then set the "name" property:
VPlexcli:/clusters/cluster-1/exports/storage-views> set esx_storage_view::name mynewname
The name's changed:
VPlexcli:/clusters/cluster-1/exports/storage-views> ls
federation_storage_view mynewname
Change it again:
VPlexcli:/clusters/cluster-1/exports/storage-views> set mynewname::name esx_storage_view
VPlexcli:/clusters/cluster-1/exports/storage-views> ls
esx_storage_view federation_storage_view
I don't know what the RESTful API call would be to do that, but perhaps with this information it's simple to do via Rest.
Gary
jgann
5 Posts
0
May 28th, 2014 04:00
thanks Gary, excellent answer.
found out I need to use http PUT in the REST api as equivalent to set in the CLI.
best greetings
Joachim Gann
supersandwhich
26 Posts
0
October 28th, 2015 13:00
how about copy all the Virtual Volumes in Storage View X to Storage View Y via CLI?
(we have Dell blade servers and are not able to put those with shared storage in a consolidated storage view)