Name

mkraid

Synopsis

mkraid [options] mddevice

mkraid (make raid) creates a RAID device from a set of block devices. All previous data on the block devices will be lost, so be careful to back up any data on drives that you are planning to include in an array. mkraid must be used to create arrays before filesystems are built and requires an /etc/raidtab file for successful execution. See the Example usage section below for details on the usage of mkraid.

Options

-c, --configfile filename

Specifies the use of a configuration file other than the default /etc/raidtab.

-f, --force, --really-force, -R

Forces the initialization, even if data or filesystems are detected on any of the block devices to be included in the array. This is a fail-safe to prevent uninitiated users from accidentally destroying their data. The --really- force or -R flag is undocumented in the command help and manual pages. When the -f or --force flags are used, mkraid will display an additional warning and request that the command be retyped with the --really-force flag.

-h, --help

Displays some helpful information about the command.

-u, --upgrade

Upgrades an old RAID to the current version of the kernel’s RAID subsystem. This option brings arrays with a RAID superblock up to the current md driver version. It does not convert older arrays without superblocks. It is advisable to back up data before attempting this operation.

-V, --version

Displays the command’s version.

Example usage

The following creates an array at /dev/md0, as ...

Get Managing RAID on Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.