PX Upgrade to 3.5 or Higher Version - "flag provided but not defined: -max_storage_nodes_per_zone"

Audience
Public
Product
Portworx
Content Type
Source Type
Knowledge Base

PX Upgrade to 3.5 or Higher Version - "flag provided but not defined: -max_storage_nodes_per_zone"

KB0022631
Pure Product
Portworx
Environment
PX Upgrade from a version lower than 3.5.0 to version 3.5.0 or later
PX installation with cloud drives
Symptoms

When a PX upgrade is triggered from a version lower than 3.5.0 to version 3.5.0 or later, the following error is observed.

 

flag provided but not defined: -max_storage_nodes_per_zone

time="2026-01-07T21:23:31-06:00" level=error msg="USAGE ERROR: Could not parse options, flag provided but not defined: -max_storage_nodes_per_zone\n"
Cause

Below are the possible causes which can lead to the issue.

  • The Portworx Operator version in use is earlier than 25.5.0.
    • MaxStorageNodesPerZone parameter was removed starting with PX version 3.5.0.
    • If spec.cloudStorage.MaxStorageNodesPerZone is specified in the StorageCluster configuration
      • Operator versions 25.5.0 and later will not pass this parameter to the PX cluster pods.
      • Operator versions earlier than 25.5.0 will still pass max_storage_nodes_per_zone as a PX pod argument, which can lead to this issue
  • max_storage_nodes_per_zone parameter may be configured under stc portworx.io/misc-args annotation
    • Some legacy PX installations still include MaxStorageNodesPerZone within the portworx.io/misc-args annotation
    • Even when using Operator version 25.5.0 or later, any values specified in portworx.io/misc-args are passed directly to oci-monitor without modification.
Resolution
  • If the Portworx Operator version is earlier than 25.5.0, upgrade it to version 25.5.0 or later.
  • If max_storage_nodes_per_zone is configured in the portworx.io/misc-args StorageCluster annotation, remove this parameter.