US 11,726,684 B1
Cluster rebalance using user defined rules
Ganesh Sangle, Sunnyvale, CA (US); Harsh Desai, San Jose, CA (US); and Vinod Jayaraman, San Francisco, CA (US)
Assigned to Pure Storage, Inc., Santa Clara, CA (US)
Filed by Portworx, Inc., Los Altos, CA (US)
Filed on Feb. 26, 2021, as Appl. No. 17/187,340.
Int. Cl. G06F 3/00 (2006.01); G06F 3/06 (2006.01)
CPC G06F 3/0632 (2013.01) [G06F 3/0604 (2013.01); G06F 3/067 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method for node storage rebalancing comprising:
accessing a set of rules for rebalancing data storage space in a storage node cluster, the storage node cluster including a plurality of storage nodes that each include a plurality of storage pools, wherein the storage node cluster manages the storage pools to provide volumes that the storage node cluster exposes for mounting by clients, and wherein the storage node cluster implements the set of rules, the set of rules including a trigger threshold;
determining, based on metrics of the respective storage pools, that the trigger threshold has been met; and
based on the determining that the trigger threshold has been met, performing a rebalance operation across the storage node cluster, the rebalance operation comprising
selecting source storage pools from among the storage pools, the selecting of the source storage pools comprising
determining a first metric of a first storage pool included in a group of candidate storage pools,
determining that the first metric is greater than a cluster mean metric for the storage node cluster, and
marking, based on the determining that the first metric is greater than the cluster mean metric, the first storage pool as a source storage pool included in the source storage pools
selecting target storage pools from among the storage pools, the selecting of the target storage pools comprising
determining a second metric of a second storage pool included in a group of candidate storage pools,
determining that the second metric is less than the cluster mean metric for the storage node cluster, and
marking, based on the determining that the second metric is less than the cluster mean metric, the second storage pool as a target storage pool included in the target storage pools, and
moving entire volumes from the source storage pools to the target storage pools the moving comprising
determining, based on the first metric, a volume allocation amount that needs to be moved from the first storage pool marked as the source storage pool to the second storage pool marked as the target storage pool,
selecting, based on the volume allocation amount, a closest fit volume on the first storage pool, the closest fit volume most closely fitting the volume allocation amount,
determining, based on a checking of a volume provisioning rule, that the closest fit volume can be moved from the first storage pool to the second storage pool,
determining that moving the closest fit volume would keep the first and second storage pools within the trigger threshold, and
moving, based on the determining that the closest fit volume can be moved from the first storage pool to the second storage pool and the determining that moving the closest fit volume would keep the first and second storage pools within the trigger threshold, the closest fit volume from the first storage pool to the second storage pool.