The "podname" value (mutually exclusive with "vgname") specifies Purestorage pod name.
The "vnprefix" value is an optional prefix to prepend to volume names.
The "vnprefix" can be used in combination with "podname" or "vgname".
Examples of volume name "vm-100-disk-0" mapping to PureStorage:
"podname mypod" => mypod::vm-100-disk-0
(same as "vnprefix mypod::")
"vgname mypve" => mypve/vm-100-disk-0
(same as "vnprefix mypve/")
"podname mypod", "vnprefix dev-" => mypod::dev-vm-100-disk-0
(same as "vnprefix mypod::dev-")
"vgname mypve", "vnprefix dev-" => mypve/dev-vm-100-disk-0
(same as "vnprefix mypve/dev-")
Also:
* Made "vgname" parameter optional
* Moved array address parameters check to purestorage_api_request()
* Removed volume info caching (#15), eliminated purestorage_volume_info()
* Modified purestorage_list_volumes() to return only disk names we recognize [ $vmid = undef case ]
* Use substr() instead of regex to strip volume name prefix in purestorage_get_volumes()
* Show PVE volume names in "Info ::" messages
* Added description of new parameters to README.md
Implemented purestorage_volume_restore()
Enabled volume and snapshot cloning
Eliminated purestorage_snap_volume_rollback()
Instant cloning can be done using "qm clone" with --full no
(template cloning would work from GUI too)
Examples:
To clone VM 100 to 123:
qm clone 100 123 --full no
To clone VM 100's snapshot ABCD to VM 123:
qm clone 100 123 --full no --snapname ABCD
* Added prepare_api_params() function to assemble api call parameters
* Redesigned and simplified purestorage_volume_info()
* Adjusted all api calls to have call parameters inside of $action
PVE storage subsystem does not unmap disk before moving it to another guest.
Also added check to make sure the target volume (if specified) does not exist.
Replaced run_command() occurences with exec_command() which takes care of errors
Setting $DEBUG set to 2+ will show shell commands we are executing in the log
There are border cases when volume can remain mapped or connected to array even if the vm is not running.
Ideally, this should be done at the higher level (Storage.pm?), but the current storage implementation does not do it.
Use purestorage_list_volumes2() to return information for the specified volume name.
Exclude destroyed volumes to never return a serial number of a previously destroyed volume with the same name.