forked from vitalif/vitastor
Fix Monitor being unable to change PG sizes
parent
12adfa470c
commit
fcb4aa0a11
11
mon/mon.js
11
mon/mon.js
|
@ -811,6 +811,17 @@ class Mon
|
|||
}
|
||||
PGUtil.scale_pg_count(prev_pgs, this.state.pg.history[pool_id]||{}, pg_history, pool_cfg.pg_count);
|
||||
}
|
||||
for (const pg of prev_pgs)
|
||||
{
|
||||
while (pg.length < pool_cfg.pg_size)
|
||||
{
|
||||
pg.push(0);
|
||||
}
|
||||
while (pg.length > pool_cfg.pg_size)
|
||||
{
|
||||
pg.pop();
|
||||
}
|
||||
}
|
||||
optimize_result = await LPOptimizer.optimize_change({
|
||||
prev_pgs,
|
||||
osd_tree: pool_tree,
|
||||
|
|
Loading…
Reference in New Issue