astrid-runtime/astrid · error
kernel refused storage mount: {error}
Error message
kernel refused storage mount: {error} What it means
lease_from_response() unwraps the kernel's reply to a mount request. When the kernel answers with AdminResponseBody::Error, the error text is surfaced as 'kernel refused storage mount: {error}', propagating the kernel-side refusal to the companion caller.
Source
Thrown at crates/astrid-storage-provider-fskit/src/main.rs:292
mount_id: record.mount_id,
})
}
fn authorize_stale_cleanup(
lease_is_live: bool,
requested_by: &astrid_core::PrincipalId,
acting_principal: &astrid_core::PrincipalId,
) -> Result<()> {
if !lease_is_live && requested_by != acting_principal {
bail!("stale mount recovery belongs to another acting principal");
}
Ok(())
}
fn lease_from_response(body: AdminResponseBody) -> Result<StorageMountLeaseV1> {
match body {
AdminResponseBody::StorageMountLease(lease) => Ok(*lease),
AdminResponseBody::Error(error) => bail!("kernel refused storage mount: {error}"),
_ => bail!("kernel returned an unexpected storage mount response"),
}
}
fn into_success(body: AdminResponseBody) -> Result<serde_json::Value> {
match body {
AdminResponseBody::Success(value) => Ok(value),
AdminResponseBody::Error(error) => {
bail!("kernel refused storage lifecycle request: {error}")
},
_ => bail!("kernel returned an unexpected storage lifecycle response"),
}
}
fn unmount_status(body: AdminResponseBody) -> Result<bool> {
match body {
AdminResponseBody::Success(_) => Ok(true),
AdminResponseBody::Error(error)View on GitHub (pinned to affd8760f4)
Solutions
- Read the embedded kernel error after the colon and address that underlying cause
- Check kernel logs for the refusal reason (busy path, driver unavailable, bad options)
- Retry after resolving the kernel-side condition (unmount the path, load the driver, fix options)
Example fix
// before
let lease = lease_from_response(body)?; // opaque refusal
// after
match lease_from_response(body) {
Ok(lease) => ...,
Err(e) => { log::error!("mount refused: {e}"); check_kernel_mount_state(&mountpoint)?; return Err(e); }
} Defensive patterns
Strategy: try-catch
Try / catch
// rust
let lease = match lease_from_response(body) {
Ok(lease) => lease,
Err(e) => {
eprintln!("{e}"); // includes kernel reason after the colon
// inspect kernel state (path busy? driver loaded?) then retry or abort
return Err(e);
}
}; Prevention
- Verify mountpoint is not already mounted in the kernel before requesting
- Ensure the fskit filesystem driver/kernel support is present
- Log full kernel error strings to diagnose refusals quickly
When it happens
Trigger: mount() sends a mount request to the kernel and receives an Error response — e.g. the kernel rejected the mount due to a busy path, missing filesystem support, or invalid mount options.
Common situations: Mountpoint path already mounted in the kernel; kernel lacking the fskit filesystem driver; invalid or conflicting mount options sent by the companion; kernel under maintenance/locked state.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- unexpected response from kernel: {other:?}
- unexpected response from kernel: {other:?}
- unexpected response from kernel: {other:?}
- {message}
- daemon closed guard uplink
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/b9fc53ad02623d16.
Report an issue: GitHub.