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
+12
View File
@@ -412,6 +412,18 @@ impl DiskAPI for Disk {
}
}
impl Disk {
/// Enable health monitoring on this disk.
/// Called after startup format loading completes so that remote peers
/// have time to come online before being marked as faulty.
pub fn enable_health_check(&self) {
match self {
Disk::Local(local_disk) => local_disk.enable_health_check(),
Disk::Remote(remote_disk) => remote_disk.enable_health_check(),
}
}
}
pub async fn new_disk(ep: &Endpoint, opt: &DiskOption) -> Result<DiskStore> {
if ep.is_local {
let s = LocalDisk::new(ep, opt.cleanup).await?;