Skip to content

Commit 7559a9c

Browse files
authored
Merge pull request #9 from appsignal/fix/udev-settle-after-snapshot
Wait for udev to settle after thin snapshot creation
2 parents 93423f9 + 619b1c1 commit 7559a9c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

manager/src/lvm.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ pub fn lvcreate_snapshot(vg: &str, source: &str, name: &str) -> Result<()> {
7979
anyhow::bail!("lvcreate snapshot failed: {}/{} -> {}", vg, source, name);
8080
}
8181
info!(vg, source, name, "snapshot created");
82+
// Wait for udev to process the new device node before returning so callers
83+
// can immediately open or mount the device path under /dev.
84+
let _ = Command::new("udevadm")
85+
.args(["settle", "--timeout=5"])
86+
.status();
8287
Ok(())
8388
}
8489

0 commit comments

Comments
 (0)