Reference

mdadd(8)

command set to manage md devices.

NAME

mdadd, mdrun, mdstop - command set to manage md devices.

SYNOPSIS

mdadd [options] [md_device] [block_device_1 block_device_2 ...]

mdrun [options] md_device

mdstop [options] md_device

DESCRIPTION

Md devices are virtual devices used to group real block devices. This way, two 100MB disks can be used as a single 200MB disk, whatever their interface type.

If you're using the /proc filesystem, /proc/mdstat gives you informations about md devices status.

Avaible commands are :
mdadd : groups several real devices into a virtual one.
mdrun : set a virtual device as usable, with a given mode.
mdstop : free real devices belonging to a virtual one, and flush buffers.

OPTIONS

-a

Apply the command to the set of devices described in /etc/mdtab.

-r

Starts the virtual device after the real devices are being added. Only applicable to mdadd.

-px

where x is :
l : starts the device in linear mode,
0 : starts the device in raid-0 mode,
1 : starts the device in raid-1 mode.
assuming that the mode is either compiled into the kernel or loaded using the insmod program. Only applicable to mdrun.

-cn

(raid-0 and raid-1 only)
Set the chunk size as PAGE_SIZE << n. You can also set the chunk size in kilobytes with -cxk where x is a power of 2. Only applicable to mdrun.

-fn

(raid-1 only)
Set the maximum fault number as n. Only applicable to mdrun.

-i

(raid1 only)
Show version number as well as driver version the command is compiled for.

EXAMPLES

To configure the device :

/sbin/mdadd /dev/md0 /dev/sdb1 /dev/sdc2

Warning, /sbin/mdadd /dev/md0 /dev/sdb1 /dev/sdc2 is different from /sbin/mdadd /dev/md0 /dev/sdc2 /dev/sdb1 because there's no internal ordering.

To make it usable in linear mode :

/sbin/mdrun -pl /dev/md0

To make it usable in striped mode, with 8kb chunks :

/sbin/mdrun -p0 -c8k /dev/md0

To stop it :

/sbin/mdstop /dev/md0

If you have described you md-devices in /etc/mdtab , you can replace the two first steps with

/sbin/mdadd -ar

FILES

/sbin/mdadd : main command. Other commands are symlinks to this file.
/etc/mdtab : configuration file.
/proc/mdstat : driver and devices status

AUTHOR

mdadd was written as a kernel interface to md driver by Marc ZYNGIER <[email protected]>.

BUGS

Options that are not applicable to a command are silently ignored and/or may lead to unxepected behaviour. This man page (and the whole documentation) is really brain-dead and should be rewritten. Any volunteer ?

SEE ALSO

mdtab(5)
modules package.
More informations in the README file included in the package.

History

-cn since Debian 2.2 (Potato); -fn since Debian 2.2 (Potato); -i since Debian 2.2 (Potato); -px since Debian 2.2 (Potato).

-V until Debian 2.1 (Slink); -c until Debian 2.1 (Slink); -f until Debian 2.1 (Slink); -p until Debian 2.1 (Slink); -v until Debian 2.1 (Slink).