25 Commits

Author SHA1 Message Date
Timur Kumakbayev e7f429da28 Merge pull request #21 from amulet1/veeam
Support Veeam snapshots
2025-01-30 09:32:42 +05:00
amulet1 ac971e0425 Added support for Veeam snapshots 2025-01-29 16:28:57 -05:00
Timur Kumakbayev 06410fb99a Merge pull request #40 from amulet1/expired-session
Address API session token expirations
2025-01-30 00:59:32 +05:00
amulet1 c156355589 Redesigned purestorage_api_request() to handle session expirations 2025-01-29 14:02:50 -05:00
Timur Kumakbayev c9d4c07cde Merge pull request #38 from kolesa-team/issue-37
return path in map_volume (#37)
2025-01-29 20:00:59 +05:00
timansky 2f5bc26369 Merge remote-tracking branch 'origin/main' into issue-37 2025-01-29 09:12:49 +05:00
timansky 46ccf11ece Return error if path does not exists 2025-01-29 09:12:08 +05:00
Timur Kumakbayev 7bc3922674 Merge pull request #39 from amulet1/support-pods
Add support for "podname" and "vnprefix" parameters (#29)
2025-01-29 09:09:46 +05:00
amulet1 d01feb85a8 Added support for "podname" and "vnprefix" parameters (#29)
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
2025-01-27 20:59:51 -05:00
timansky 75625bdbdb return path in map_volume (#37) 2025-01-28 05:10:45 +05:00
Timur Kumakbayev fbd1493369 Merge pull request #36 from amulet1/support-clone
Add support for volume and snapshot cloning
2025-01-28 03:28:26 +05:00
amulet1 236ab82740 Added support for volume and snapshot cloning
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
2025-01-27 17:22:38 -05:00
Timur Kumakbayev ae51b4b510 Merge pull request #31 from amulet1/dev2
Various improvements
2025-01-28 02:50:03 +05:00
Timur Kumakbayev 1eeec41f40 Merge pull request #35 from kolesa-team/development
fix linter rules name
2025-01-28 02:31:15 +05:00
timansky 6ca954e50f fix linter rules name 2025-01-28 02:30:17 +05:00
Dmitry Petrov 25aba73428 Merge branch 'main' into dev2 2025-01-27 16:28:39 -05:00
amulet1 c249fe46cb Merged $params into $action in purestorage_api_request()
* 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
2025-01-27 16:16:34 -05:00
Timur Kumakbayev f248f00e14 Merge pull request #34 from amulet1/pvesm
Add an option to configure the plugin using `pvesm`
2025-01-28 01:12:59 +05:00
Timur Kumakbayev 424b94b2a9 Merge pull request #33 from amulet1/sparseinit
Enabled "sparseinit" feature
2025-01-28 01:12:44 +05:00
Dmitry Petrov 6b37e1ea81 Updated README.md
Added pvesm as a method to configure the plugin.
2025-01-27 09:57:34 -05:00
amulet1 a0fcb1437c Enabled "sparseinit" feature
This dramatically speeds up copy/restore operations by skipping writing zeroes to unallocated blocks
2025-01-27 09:52:20 -05:00
amulet1 752b6fe06f Merged $body into $action parameter in purestorage_api_request() 2025-01-25 12:22:14 -05:00
amulet1 71542b1b94 Replaced purestorage_request() with purestorage_api_request()
Combined $type and $method parameters into $action hash reference
2025-01-25 12:21:53 -05:00
amulet1 725e99023f Made purestorage_request() static 2025-01-25 12:21:13 -05:00
amulet1 4a1bec377f Started redesign of purestorage_request()
Simplified code, eliminated purestorage_get_auth_token()
2025-01-25 12:19:14 -05:00
3 changed files with 405 additions and 403 deletions
+9 -5
View File
@@ -1,20 +1,24 @@
# .perltidyrc - Configuration for perltidy
# Indentation
## Indentation
--indent-columns=2
--continuation-indentation=2
--extended-continuation-indentation
# Line length and wrapping
## Line length and wrapping
--maximum-line-length=160
# Brackets spaces
## Brackets spaces
--paren-tightness=0
--brace-tightness=0
--block-brace-tightness=0
# Comments
## Comments
## Blocks
# Blocks
--cuddled-else
--cuddled-blocks
+376 -393
View File
File diff suppressed because it is too large Load Diff
+20 -5
View File
@@ -56,7 +56,7 @@ blacklist {
}
blacklist_exceptions {
wwid "624a9370.*"
wwid "3624a9370.*"
device {
vendor "PURE"
}
@@ -96,11 +96,23 @@ sudo apt install ./libpve-storage-purestorage-perl.deb
## Configuration
After installing the plugin, you need to configure Proxmox VE to use it. Since Proxmox VE does not currently support adding custom storage plugins via the GUI, you will need to manually edit the storage configuration file `/etc/pve/storage.cfg`.
After installing the plugin, you need to configure Proxmox VE to use it. Since Proxmox VE does not currently support adding custom storage plugins via the GUI, you will need to open shell and use `pvesm` command to add it:
```bash
pvesm add purestorage <storage_id> \
--nodes <proxmox_node_list> \
--address https://<purestorage_fqdn_or_ip> \
--token token <purestorage_api_token> \
--vgname <purestorage_volume_group_name> \
--hgsuffix <purestorage_host_suffix>
--content images
```
Alternatively, you can manually edit the storage configuration file `/etc/pve/storage.cfg`.
```
purestorage: pure
nodes: <proxmox_node_list>
purestorage: <storage_id>
nodes <proxmox_node_list>
address https://<purestorage_fqdn_or_ip>
token <purestorage_api_token>
vgname <purestorage_volume_group_name>
@@ -110,10 +122,13 @@ purestorage: pure
| Parameter | Description |
| --------- | ----------- |
| storage_id | The storage identifier (name under which it will appear in the Storage list) |
| nodes | (`optional`) A comma-separated list of Proxmox node names. Use this parameter to limit the plugin to specific nodes in your cluster. If omitted, the storage is available to all nodes. |
| address | The URL or IP address of the Pure Storage API endpoint. Ensure that the Proxmox VE nodes can reach this address over the network. |
| token | The API token used for authentication with the Pure Storage array. This token must have sufficient permissions to create and manage volumes. |
| vgname | The name of the volume group where new virtual disks will be created. This should match the configuration on your Pure Storage array. |
| vgname | (`optional`, conflicts with `podname`) The volume group name where virtual disks will be stored. This should match the configuration on your Pure Storage array. |
| podname | (`optional`, conflicts with `vgname`) The pod name where virtual disks will be stored. This should match the configuration on your Pure Storage array. |
| vnprefix | (`optional`) The prefix to prepend to name of virtual disks. |
| hgsuffix | (`optional`) A suffix that is appended to the hostname when the plugin interacts with the Pure Storage array. This can help differentiate hosts if necessary. |
| content | Specifies the types of content that can be stored. For virtual machine disk images, use images. |