rustfs/rustfs · error · StorageError::DriveIsRoot

0x12

0x12

Error message

Drive is root

What it means

Safety check error: the configured drive path resolves to the filesystem root '/'. Using root as a storage drive is disallowed because formatting/healing would endanger the host OS. Raised during disk validation at startup.

Source

Thrown at crates/ecstore/src/error/mod.rs:50

}

impl std::fmt::Display for StableIoContextError {
    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        formatter.write_str(self.message)
    }
}

impl std::error::Error for StableIoContextError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        Some(self.source.as_ref())
    }
}

pub(crate) fn stable_io_error<E>(message: &'static str, source: E) -> std::io::Error
where
    E: Into<Box<dyn std::error::Error + Send + Sync>>,
{
    std::io::Error::other(StableIoContextError {
        message,
        source: source.into(),
    })
}

/// Storage layer error type covering disk, volume, bucket, object, multipart,
/// erasure-coding, and operational error conditions.
///
/// Variants are organized by domain:
///   - **Disk / Volume** – low-level storage I/O
///   - **Bucket** – bucket-level operations
///   - **Object** – object-level operations (including versioning)
///   - **Multipart** – multipart upload lifecycle
///   - **Erasure / Quorum** – erasure coding and quorum failures
///   - **Operational** – decommission, healing, rate-limiting, etc.
///   - **Generic** – I/O, locks, and catch-all errors
#[derive(Debug, thiserror::Error)]
pub enum StorageError {

View on GitHub (pinned to 5dca076efe)

Solutions

  1. Configure a dedicated, non-root mount path for storage
  2. Never point a drive at '/'; use a separate partition/mount
  3. Restart with corrected drive configuration
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/ecstore/src/error/mod.rs:50 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rustfs/rustfs@5dca076efe (2026-08-20). Data as JSON: /api/errors/a749b8eee2462f2f. Report an issue: GitHub.