spacedriveapp/spacedrive · warning · anyhow::Error
Volume not mounted, cannot verify path existence
Error message
Volume not mounted, cannot verify path existence
What it means
During indexing change detection, the volume backend's exists() returned VolumeError::NotMounted. The handler cannot verify whether a changed path still exists, so it warn-logs and returns an error rather than guessing deleted-or-not. The correct mental model is deferred work: once the volume is remounted, a rescan reconciles state.
Source
Thrown at core/src/ops/indexing/change_detection/handler.rs:74
/// Check if a path exists, distinguishing between "doesn't exist" and "can't access".
///
/// Critical for preventing false deletions when volumes go offline.
pub async fn path_exists_safe(
path: &Path,
backend: Option<&Arc<dyn crate::volume::VolumeBackend>>,
) -> Result<bool> {
use crate::volume::error::VolumeError;
if let Some(backend) = backend {
match backend.exists(path).await {
Ok(exists) => Ok(exists),
Err(VolumeError::NotMounted(_)) => {
tracing::warn!(
"Volume not mounted when checking path existence: {}",
path.display()
);
Err(anyhow::anyhow!(
"Volume not mounted, cannot verify path existence"
))
}
Err(VolumeError::Io(ref e)) if e.kind() == std::io::ErrorKind::NotFound => Ok(false),
Err(VolumeError::Io(io_err)) => {
tracing::warn!(
"IO error when checking path existence for {}: {}",
path.display(),
io_err
);
Err(anyhow::anyhow!(
"IO error, volume may be offline: {}",
io_err
))
}
Err(e) => {
tracing::warn!(
"Volume error when checking path existence for {}: {}",View on GitHub (pinned to 6dfeccf211)
Solutions
- Remount or reconnect the volume, then trigger a rescan of its location
- Pause or skip indexing jobs for volumes known to be offline instead of letting them fail
- Check mount status before starting scans over a volume's paths
- If the volume is permanently gone, remove its location from the library
Defensive patterns
Strategy: fallback
Validate before calling
// Probe the volume root before running change detection over its paths.
if let Some(backend) = backend {
if matches!(backend.exists(location_root).await, Err(VolumeError::NotMounted(_))) {
// volume offline: defer this event batch instead of failing the handler
}
} Prevention
- Eject volumes cleanly
- Reconnect network volumes before resuming indexing
- Treat NotMounted as a signal to defer work, not to fail it
When it happens
Trigger: External drive unplugged, network share disconnected, or cloud volume logged out while the indexer processes events whose paths live on that volume.
Common situations: USB drives removed without ejecting, laptops waking before network volumes reconnect, cloud storage credentials expiring mid-session.
Related errors
- Cannot access path: {}
- IO error, volume may be offline: {}
- Failed to get metadata via backend: {}
- Location {} has no volume_id - volume must be detected befor
- Could not determine binary directory
AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16).
Data as JSON: /api/errors/26ebfe9593d0f1ce.
Report an issue: GitHub.