LinuxCommandLibrary

dmraid

Manage software RAID (dmraid) devices

SYNOPSIS

dmraid [-r|-V] [-C|-ddfhklmstvx] [--clear] [device [device ...]]

PARAMETERS

-r, --readonly
    Open devices in read-only mode

-V, --version
    Display version information

-C, --create [type]
    Create new RAID set of specified type

-d, --display
    Display RAID set information

-D, --dump
    Dump detailed RAID set metadata

-E, --export
    Export RAID set metadata to stdout

-f, --force
    Force dangerous operations like metadata overwrite

-h, --help
    Show help and usage

-k, --kill
    Deactivate and remove RAID set

-l, --query
    Query device for RAID metadata presence

-m, --metadata
    List supported metadata formats

-s, --select <setname>
    Select specific RAID set

-t, --test
    Test devices for supported RAID metadata

-v, --verbose
    Enable verbose output

-x, --examine
    Examine devices for RAID metadata

-a, --activate [yy]
    Activate RAID sets (y: yes, n: no)

--clear, -c
    Clear superblock/metadata from devices

--ignorelocking, -i
    Ignore device locking

--inroot, -R
    Scan / for metadata (root mode)

--partial, -p
    Allow activation of partial sets

--separator <char>
    Set RAID name separator

--setfaultylevel <level>
    Set faulty device level (0-5)

DESCRIPTION

dmraid is a command-line tool for detecting, managing, assembling, and activating RAID arrays using the Linux device-mapper (dm) RAID driver. It specializes in firmware RAID (also called fakeRAID) from controllers like Intel Matrix Storage Manager (ISW), DDF, Adaptec HostRAID (AHR), HP Smart Array (MSA), LSI (LS), JMicron (JM), and others.

Unlike mdadm, which handles native Linux md RAID, dmraid reads proprietary metadata formats to present RAID sets as /dev/mapper devices. Common tasks include scanning disks for metadata, activating sets at boot (via -ay), creating new arrays, or querying status. It supports RAID levels 0,1,4,5,6,10,50,60 depending on the metadata type.

dmraid is invoked with options specifying actions like creation (-C), display (-D), or testing (-t). Devices can be passed explicitly or scanned automatically. It's essential for booting from fakeRAID setups but requires kernel dm-raid support.

CAVEATS

dmraid can destroy data if misused (e.g., -C or -f); backup first. Deprecated in some distros for Intel RAID (use mdadm --imsm). Requires kernel modules dm-mod, dm-raid. Not for native md RAID; boot-time activation needs initramfs hooks. Limited to specific firmware formats.

SUPPORTED FORMATS

DDF (0,1,4,5,6,10,50,60), ISW (Intel, 0,1,10), AHR (Adaptec), HPT (Highpoint), JM (JMicron), LS (LSI), MSA (HP), NETSNOW (Netcell), PFC (Promise), SIN (Silicon Image), STEC (STEC). Use -m to list.

BOOT USAGE

For initramfs, add dmraid -ay hook. Devices appear as /dev/mapper/<name>. Rescan with -ay after hotplug.

HISTORY

Developed circa 2005 by Heinz Mauelshagen as part of device-mapper tools to handle non-Linux RAID metadata. Integrated into major distros by 2007 for fakeRAID support. Maintained in dmraid package; updates slowed post-2015 as mdadm absorbed some formats like IMSM/DDF.

SEE ALSO

mdadm(8), dmsetup(8), lsblk(1), blkid(1), mdmon(8)

Copied to clipboard