108 Commits

Author SHA1 Message Date
timansky 63cf0b6641 Removed unnecesary if (#61) 2025-03-27 01:52:54 +05:00
timansky 5423702ade Increase timeout; Added additional check (#61) 2025-03-26 14:33:57 +05:00
Timur Kumakbayev 0aebefe4d3 Merge pull request #62 from plieven/fix/snap_mount
fix: error out if snapname is set in filesystem_path
2025-03-26 12:06:35 +05:00
Peter Lieven e0fcb81e69 fix: error out if snapname is set in filesystem_path
Pure currently does not support direct mounting of snapshots.
As we currently silently ignore the snapname field at least error
out if we receive a non empty snapname. Its unclear if this is
still used as vzdump nowadays does live backups.

Signed-off-by: Peter Lieven <pl@dlhnet.de>
2025-03-19 17:16:34 +01:00
Timur Kumakbayev b4c81dd5a2 Merge pull request #55 from amulet1/cleanup3
Cleanup
2025-02-17 15:17:37 +05:00
amulet1 08955ca5e1 Use file_read_firstline() in get_device_size() 2025-02-16 13:56:02 -05:00
amulet1 6d70cb8c4b Drop $cache usage as there are no caller using it and the same storeid multiple times
* Stop using $cache in list_images()
 * Stop using $cache in status()
2025-02-15 14:05:22 -05:00
amulet1 aac760b3cb Use /sys/block/*/size to determine device size 2025-02-15 13:30:12 -05:00
Timur Kumakbayev aeb3547d5e Merge pull request #54 from amulet1/scsi_scan
Redesign to use same scanning functions for both fc and iscsi protocols
2025-02-14 12:54:40 +05:00
amulet1 87b579b65a Rescan slaves on volume resize instead of searching for wwn across all SCSI devices
Eliminate scsi_rescan_device()

Add get_device_path_wwn()

Add device_op() to serve as helper for device operations

In scsi_scan_new()
 * Use device_op()

In purestorage_get_device_size()
 * Rename to get_device_size()
 * Drop $class

In remove_block_device()
 * Rename it to block_device_action()
 * Use common code to remove or rescan devices
 * Use device_op() helper to perform a device action

Add block_device_slaves() returning resolved device path and its slaves

In purestorage_get_wwn()
 * Use get_device_path_wwn() to simplify the code

Redesign purestorage_resize_volume()
 * Avoid extra API call by using volume serial returned by volume resize action
 * Use get_device_path_wwn()
 * Remove unneeded protocol checks
 * Support [unlikely] case when resized volume is not mapped/connected
 * Use block_device_slaves() and block_device_action() to simplify the code

Redesign unmap_volume()
 * Use block_device_slaves() and block_device_action() to simplify the code
2025-02-13 19:10:24 -05:00
amulet1 b016137857 General changes to use scsi_*() functions for iSCSI mode
In scsi_scan_new()
 * Pass protocol as parameter
 * Adjust code to scan hosts for specified protocol
 * Count number of scanned hosts, report it in debug mode

In scsi_rescan_new()
 * Search for wwid in /sys/class/scsi_disk
 * Use stricter search pattern
 * Count number of found matches, report it in debug mode

Rename purestorage_unmap_disk() to remove_block_device()

In purestorage_resize_volume()
 * Report that volume was resized after its new size is confirmed
 * Use scsi_rescan_device() for iscsi
 * Change "Info :: New size detected ..." to debug output

In map_volume()
 * Use scsi_scan_new() for iscsi

In unmap_volume()
 * Remove redundant block device check
 * Change info messages to debug output
2025-02-13 11:04:10 -05:00
Timur Kumakbayev c029d3b90a Merge pull request #53 from amulet1/cleanup2
Minor changes and logging improvements
2025-02-12 21:31:42 +05:00
amulet1 f1bf737d39 Minor changes and logging improvements
Include leading "3" into $purestorage_wwn_prefix

In purestorage_get_wwn()
 * modify code to use updated $purestorage_wwn_prefix value
 * add warning if volume is not found

In exec_command()
 * die on error by default, update affected callers
 * allow to invert success/failure with warning suppression (e.g. to support "fuser")
 * update executables to full path inside of the function
 * update affected callers

In wait_for()
 * die on timeout instead of returning 0, update affected callers

In purestorage_unmap_disk()
 * drop $class
 * check that disk is a block device

In unmap_volume()
 * improve error checking and logging
 * add support for "fuser" check (but leave it commented out)

In scsi_rescan_device()
 * remove 'multipath -r' call (there is a 'multipathd resize map' call)
2025-02-12 11:01:41 -05:00
Timur Kumakbayev 14d93fab80 Merge pull request #48 from NojuHD/fc-support
Add support for SCSI (Fibre Channel)
2025-02-10 09:00:52 +05:00
NojuHD 7c77b06585 Merge branch 'main' into fc-support 2025-02-09 06:07:48 +01:00
Timur Kumakbayev 58265255f1 Merge pull request #51 from amulet1/cleanup
Multipathing cleanup and improvements
2025-02-09 01:21:44 +05:00
amulet1 d93f562bdc Multipathing cleanup and improvements
* use multipathd for certain functions
 * suppress output of exec_command() by default if $DEBUG value is less than 3
 * introduce multipath_check() function
 * eliminate purestorage_cleanup_diskmap()

Introduce wait_for() function
 * to be used instead of waiting loops
 * reduce default timeout and sleep delay
 * do not log "Waiting for..." unless it actually waited
 * show total time spent while waiting [not counting actual wait checks]

In purestorage_resize_volume()
 * replace "multipath -r" call (unneeded reload of *all* multipath maps) with "multipathd resize map" call
 * use wait_for() instead of waiting loop

In map_volume()
 * remove unneeded "multipath -a" call
 * use wait_for() instead of waiting loop
 * call "multipathd add map" unless multipath_check() succeeds

In unmap_volume()
 * use multipath_check()
 * remove unneeded "multipath -w" call
 * replace "multipath -f" with "multipathd remove map" call, die on error
2025-02-08 12:01:25 -05:00
Timur Kumakbayev a32f42999f Merge pull request #50 from amulet1/cluster
ActiveCluster support
2025-02-08 14:55:52 +05:00
NojuHD 32ed77d155 Set protocol default via "$default_protocol" 2025-02-08 00:06:34 -05:00
NojuHD 44e53e7e20 Fix typos & change name scheme 2025-02-07 21:41:14 -05:00
NojuHD e6abf236a0 Correct formatting (perltidy) 2025-02-07 12:29:05 -05:00
NojuHD 7bb26c2a7b Remove multipathd (use existing multipath) 2025-02-07 13:57:24 +01:00
Timur Kumakbayev 7b5b78ad55 Merge pull request #45 from NojuHD/main
Update README.md
2025-02-07 08:22:09 +05:00
amulet1 576a4d4181 Initial ActiveCluster support (#42)
* ActiveCluster is enabled by providing comma-separated cluster arrays parameters in "address" and "token"
 * retry non-API errors on a second array
 * connect/disconnect volumes to host on both arrays
 * related code refactoring and improvements
2025-02-06 14:56:51 -05:00
NojuHD 4f3f2d081d Added support for SCSI (Fibre Channel)
- Added subroutines
    - added sub::scsi_scan_new
    - added sub::scsi_rescan_device
- Added protocol selection
2025-02-05 19:40:18 -05:00
NojuHD 3cb2f31699 Update README.md
1. changing git clone to https so no auth is needed.
2. removing doubled "token" in pvesm template.
2025-02-04 18:36:48 +01:00
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
Timur Kumakbayev 78a46db7c4 Merge pull request #17 from kolesa-team/development
Do not convert to prerelease
2025-01-20 03:03:24 +05:00
timansky 3a76010d96 Do not convert to prerelease 2025-01-20 03:02:51 +05:00
Timur Kumakbayev fc989677bb Merge pull request #16 from kolesa-team/temp
More fixes
2025-01-20 02:33:23 +05:00
Timur Kumakbayev d9018eec0f Merge pull request #14 from PwrBank/main
Troubleshooting commands
2025-01-19 20:56:17 +05:00
PwrBank c6770fc4cd Update README.md
Updated troubleshooting commands, as suggested by @timansky
2025-01-17 06:49:47 -06:00
amulet1 6474161796 Unmap volume before renaming it
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.
2025-01-16 15:41:31 -05:00
amulet1 829cf63e1f Added purestorage_get_volume_info() and purestorage_get_existing_volume_info()
The functions return first matching volume object.

Use purestorage_get_existing_volume_info() in purestorage_get_wwn()
2025-01-16 15:41:07 -05:00
amulet1 660d9bff76 Make hgsuffix truly optional
Replaced the default value "pve" with ""

Resolves #5
2025-01-16 15:40:30 -05:00
PwrBank e9342bee43 Merge branch 'kolesa-team:main' into main 2025-01-16 11:32:40 -06:00
PwrBank d97f93c340 Update README.md
Added some troubleshooting commands
2025-01-16 11:32:29 -06:00
Timur Kumakbayev 265904dfa3 Merge pull request #10 from kolesa-team/development
Release v0.0.3
2025-01-16 21:57:34 +05:00
timansky 6e68385d96 remove zigmund from codeowners 2025-01-16 21:56:45 +05:00
timansky b8e620f4c1 Merge remote-tracking branch 'origin/main' into development 2025-01-16 21:56:29 +05:00
Timur Kumakbayev f508c00b4f Merge pull request #13 from PwrBank/main
Update README.md
2025-01-16 21:34:26 +05:00
PwrBank 077514702f Update README.md
Fixed type on the manual install instructions
2025-01-16 08:25:58 -06:00
timansky e4aae03d51 README added lvm case 2025-01-16 08:59:08 +05:00
Timur Kumakbayev 081c0b8459 Merge pull request #12 from amulet1/main
Various fixes and improvements (#9)
2025-01-16 08:55:19 +05:00
amulet1 246cba516e Added wrapper to run_command() to streamline error handling
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
2025-01-15 12:47:39 -05:00
Dmitry Petrov 17ddc7ecc4 Merge pull request #4 from kolesa-team/main
Merge README.md changes
2025-01-15 09:43:30 -05:00
Timur Kumakbayev 621ebf7dd2 Merge pull request #8 from PwrBank/patch-1 2025-01-15 18:36:34 +05:00
PwrBank c26a4a659e Update README.md
Clarified to create the Custom folder if it does not exist
Corrected the copy command
2025-01-15 07:12:53 -06:00
Timur Kumakbayev c3830d827f Merge pull request #6 from amulet1/fixes
Various fixes
2025-01-15 16:42:09 +05:00
Timur Kumakbayev 6dbf308f17 Merge pull request #4 from kolesa-team/development
- snapshot eradicate on remove
2025-01-15 16:42:01 +05:00
Dmitry Petrov 16721e35d1 Updated recommended multipah.conf file
Added Pure wwids to blacklist_exceptions section.
2025-01-14 14:32:45 -05:00
Dmitry Petrov d2fecfd95a unmap_volume(): Do not die if volume is already unmapped
(accidentally reintroduced the issue in prior commit)
2025-01-14 13:35:00 -05:00
Dmitry Petrov a8de2749c5 unmap_volume(): Use $wwid instead of $path where possible
Other changes:
  * Replaced readlink() with abs_path()
  * Added error check for blockdev call
2025-01-14 11:43:40 -05:00
Dmitry Petrov 4484ff1a01 Simplified rename_volume() 2025-01-13 20:03:35 -05:00
Dmitry Petrov 3f1c997a75 Cleanup: removed unneeded assert_* functions 2025-01-13 15:34:21 -05:00
Dmitry Petrov 13b66fdfaf parse_volume(): return volume format as 'raw'
This fixes an issue with migration of EFI disks.
2025-01-13 14:51:54 -05:00
Dmitry Petrov 01d502007c Show slave disk names on one line in unmap_volume() 2025-01-13 12:30:26 -05:00
Dmitry Petrov c06e2f24c0 Add $storeid to cache key in list_images() and status()
This allows to have multiple instances of the plugin with different parameters.
2025-01-13 12:12:12 -05:00
dpetrov67 d0f4d285fe Merge pull request #3 from dpetrov67/fixes-2
Merge fixes-2 branch into main
2025-01-09 14:30:48 -05:00
dpetrov67 3c7e0ca365 Merge pull request #2 from lnxbil/patch-1
correct name for storage.cfg
2025-01-09 14:18:47 -05:00
Andreas Steinel 288300aa1f correct name for storage.cfg
The configuration file is not storage.conf, but storage.cfg.
2025-01-09 08:33:29 +01:00
dpetrov67 ac595ce025 purestorage_volume_connection(): be silent on non-fatal errors
Instead of reporting errors when volume is already connected to/removed from a host, add "was already" to the info output.
2025-01-07 15:11:39 -05:00
dpetrov67 b8199a39de Eliminated purestorage_rescan_diskmap()
Call "multipath -r" on volume resize only.
2025-01-07 08:56:37 -05:00
dpetrov67 3702c5670e purestorage_rescan_diskmap(): rescan node on resize 2025-01-07 08:34:45 -05:00
dpetrov67 8f09da2161 purestorage_volume_connection(): minor clean up and refactoring
Also merged pure_host() into  purestorage_volume_connection().
2025-01-07 08:06:41 -05:00
dpetrov67 d41eddf46a purestorage_resize_volume(): minor clean up and refactoring 2025-01-07 08:02:39 -05:00
dpetrov67 61a60a5203 purestorage_remove_volume(): minor cleanup and frefactoring 2025-01-07 07:55:57 -05:00
dpetrov67 e4f9792f66 purestorage_create_volume(): minor cleanup and refactoring 2025-01-07 07:36:51 -05:00
dpetrov67 791f08b690 alloc_image(): Do not try to remove volume if we failed to create it 2025-01-07 07:31:48 -05:00
dpetrov67 3d23f66fd6 Always try to deactivate volume before removal
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.
2025-01-07 07:28:13 -05:00
dpetrov67 3dc6baaa0c multipath-related clean up
Sew issue #1.
2025-01-06 21:06:00 -05:00
dpetrov67 3ce60e55e4 Simplified purestorage_get_wwn()
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.
2025-01-05 19:45:12 -05:00
dpetrov67 78a67d852c Added purestorage_list_volumes2() allowing to filter by name(s) 2025-01-05 19:26:41 -05:00
dpetrov67 ad11226845 Removed unused $disk_prefix variable 2025-01-05 18:46:52 -05:00
dpetrov67 ea4021a8d0 alloc_image(): Adjust image size to be at least 1024kb 2025-01-04 09:49:20 -05:00
dpetrov67 ccaad9446e Unmap volume before dropping its connection to storage 2024-12-30 16:25:48 -05:00
dpetrov67 5ff29eed5b Correct logging output in deactivate_volume()
deactivate_volume() should not say "... added to host".
2024-12-30 15:25:59 -05:00
dpetrov67 6e184b88e0 Filter fix in purestorage_list_volumes
"qm rescan" was re-adding previously destroyed disks.
2024-12-28 20:10:07 -05:00
dpetrov67 c8737e0e90 Make hgsuffix optional 2024-12-28 16:22:33 -05:00
timansky adcf24c808 fix features 2024-12-26 15:58:35 +05:00
timansky 2654c87bb2 - snapshot eradicate on remove
- allow snapshot state
- logs format
- api http response cache
- add x-request-id header
2024-12-26 10:17:07 +05:00
Timur Kumakbayev a72ebe5fba Merge pull request #3 from kolesa-team/issue-2
Replace hardcoded sleep with loop (fixes #2)
2024-12-10 10:13:22 +05:00
timansky 01d6947af2 One style prefix output for logs 2024-12-09 19:47:26 +05:00
timansky 06e95aa7e3 Replace hardcoded sleep with loop (fixes #2) 2024-12-09 19:34:44 +05:00
5 changed files with 831 additions and 617 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ jobs:
tag_name: ${{ github.ref_name }}
generate_release_notes: true
make_latest: true
prerelease: true
prerelease: false
files: |
*.deb
sha256sums
+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
+1 -1
View File
@@ -1 +1 @@
* @timansky @zigmund
* @timansky
+777 -604
View File
File diff suppressed because it is too large Load Diff
+43 -6
View File
@@ -56,6 +56,7 @@ blacklist {
}
blacklist_exceptions {
wwid "3624a9370.*"
device {
vendor "PURE"
}
@@ -72,11 +73,13 @@ To manually install the plugin, follow these steps:
```bash
# Clone repository
git clone git@github.com:kolesa-team/pve-purestorage.git
git clone https://github.com/kolesa-team/pve-purestorage-plugin.git
# Navigate to the Plugin Directory
cd pve-purestorage
# Create the custom plugin directory if it does not already exist
mkdir /usr/share/perl5/PVE/Storage/Custom
# Copy plugin to custom plugin directory
sudo cp PureStoragePlugin.pm /usr/share/perl5/PVE/Storage/Custom
sudo cp PureStoragePlugin.pm /usr/share/perl5/PVE/Storage/Custom/PureStoragePlugin.pm
# Restart Proxmox VE
sudo systemctl restart pve-cluster.service pvedaemon.service pvestatd.service pveproxy.service pvescheduler.service
```
@@ -93,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.conf`.
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 <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>
@@ -107,12 +122,16 @@ 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. |
| protocol | (`optional`, default is `iscsi`) Specifies the storage protocol (iscsi, fc) |
> **_NOTE:_** Ensure that the token and other sensitive information are kept secure and not exposed publicly.
@@ -138,10 +157,28 @@ sudo systemctl restart pve-cluster.service pvedaemon.service pvestatd.service pv
- Verify Network Connectivity: Ensure that the Proxmox VE nodes can reach the Pure Storage array over the network. Check for firewall rules or network issues that might be blocking communication.
- Review Logs: Check the Proxmox VE logs for any error messages related to storage or the plugin. Logs are typically found in /var/log/pve.
These commands are helpful for troubleshooting:
```bash
multipath -ll -v3 #diagnose issues with the multipath service
iscsiadm -m node #list what iscsi nodes are mounted
ls -l /dev/mapper/3624a9370* #list wwids of Pure mapped devices on the system
```
- Multipath Configuration: Verify that your multipath.conf is correctly configured and that multipath devices are recognized. Use multipath -ll to list the current multipath devices.
- API Token Permissions: Ensure that the API token used has the necessary permissions to create and manage volumes on the Pure Storage array.
- Plugin Updates: Ensure you are using the latest version of the plugin. Check the GitHub repository for updates.
### Known issues
- `lvm inside a volume`: If you plan to use LVM inside a volume, it is better to add purestorage volumes to the ignore list to avoid scanning.
```bash
cat /etc/lvm/lvmlocal.conf
...
devices {
global_filter=["r|/dev/zd.*|","r|/dev/rbd.*|","r|/dev/mapper/3624a9370.*|"]
}
```
## Contributing
Contributions to this project are welcome.