fix(startup): Only monitor disk health after format loading (#1854)

Co-authored-by: houseme <housemecn@gmail.com>
Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
evan slack
2026-02-21 07:46:14 -05:00
committed by GitHub
parent f31cd4b716
commit 23f7ffe36b
4 changed files with 58 additions and 41 deletions
+9 -1
View File
@@ -202,11 +202,14 @@ impl ECStore {
// validate_parity(parity_count, pool_eps.drives_per_set)?;
// Initialize disks without health monitoring so that remote peers
// are not immediately marked as faulty before they have a chance to
// start up. Health monitoring is enabled after format loading succeeds.
let (disks, errs) = store_init::init_disks(
&pool_eps.endpoints,
&DiskOption {
cleanup: true,
health_check: true,
health_check: false,
},
)
.await;
@@ -250,6 +253,11 @@ impl ECStore {
}
}?;
// Format loading succeeded, enable health monitoring on all disks
for disk in disks.iter().flatten() {
disk.enable_health_check();
}
if deployment_id.is_none() {
deployment_id = Some(fm.id);
}