aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/cli/structs.rs7
-rw-r--r--src/garage/repair.rs8
2 files changed, 15 insertions, 0 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs
index f134cd49..588900a3 100644
--- a/src/garage/cli/structs.rs
+++ b/src/garage/cli/structs.rs
@@ -282,6 +282,13 @@ pub enum RepairWhat {
/// Only redo the propagation of version deletions to the block ref table (extremely slow)
#[structopt(name = "block_refs")]
BlockRefs,
+ /// Verify integrity of all blocks on disc (extremely slow, i/o intensive)
+ #[structopt(name = "blocks_integrity")]
+ BlockIntegrity {
+ /// Limit on i/o speed, in B/s
+ #[structopt(name = "limit")]
+ limit: Option<usize>,
+ },
}
#[derive(Serialize, Deserialize, StructOpt, Debug, Clone)]
diff --git a/src/garage/repair.rs b/src/garage/repair.rs
index 8200f1f0..a67bf2e5 100644
--- a/src/garage/repair.rs
+++ b/src/garage/repair.rs
@@ -63,6 +63,14 @@ impl Repair {
.await?;
}
+ if let Some(RepairWhat::BlockIntegrity { limit }) = opt.what {
+ info!("Verifying integrity of stored blocks");
+ self.garage
+ .block_manager
+ .verify_data_store_integrity(&must_exit, limit)
+ .await?;
+ }
+
Ok(())
}