{"record":{"id":"b9fc53ad02623d16","repo":"astrid-runtime/astrid","slug":"kernel-refused-storage-mount-error","errorCode":null,"errorMessage":"kernel refused storage mount: {error}","messagePattern":"kernel refused storage mount: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fskit/src/main.rs","lineNumber":292,"sourceCode":"        mount_id: record.mount_id,\n    })\n}\n\nfn authorize_stale_cleanup(\n    lease_is_live: bool,\n    requested_by: &astrid_core::PrincipalId,\n    acting_principal: &astrid_core::PrincipalId,\n) -> Result<()> {\n    if !lease_is_live && requested_by != acting_principal {\n        bail!(\"stale mount recovery belongs to another acting principal\");\n    }\n    Ok(())\n}\n\nfn lease_from_response(body: AdminResponseBody) -> Result<StorageMountLeaseV1> {\n    match body {\n        AdminResponseBody::StorageMountLease(lease) => Ok(*lease),\n        AdminResponseBody::Error(error) => bail!(\"kernel refused storage mount: {error}\"),\n        _ => bail!(\"kernel returned an unexpected storage mount response\"),\n    }\n}\n\nfn into_success(body: AdminResponseBody) -> Result<serde_json::Value> {\n    match body {\n        AdminResponseBody::Success(value) => Ok(value),\n        AdminResponseBody::Error(error) => {\n            bail!(\"kernel refused storage lifecycle request: {error}\")\n        },\n        _ => bail!(\"kernel returned an unexpected storage lifecycle response\"),\n    }\n}\n\nfn unmount_status(body: AdminResponseBody) -> Result<bool> {\n    match body {\n        AdminResponseBody::Success(_) => Ok(true),\n        AdminResponseBody::Error(error)","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fskit/src/main.rs#L274-L310","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)"],"exampleFix":"// before\nlet lease = lease_from_response(body)?; // opaque refusal\n// after\nmatch lease_from_response(body) {\n    Ok(lease) => ...,\n    Err(e) => { log::error!(\"mount refused: {e}\"); check_kernel_mount_state(&mountpoint)?; return Err(e); }\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// rust\nlet lease = match lease_from_response(body) {\n    Ok(lease) => lease,\n    Err(e) => {\n        eprintln!(\"{e}\"); // includes kernel reason after the colon\n        // inspect kernel state (path busy? driver loaded?) then retry or abort\n        return Err(e);\n    }\n};","preventionTips":["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"],"tags":["mount","kernel","ipc","rust"],"backgroundTag":"http-error-response","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}