DMRAID

Section: Maintenance Commands (8)
Updated: DMRAID TOOL
 

NAME

dmraid - discover software RAID devices and activate RAID sets  

SYNOPSIS

dmraid {-a|--activate}{y[es]/n[o]}
 [-d|--debug]{0,} [-v|--verbose]{0,}
 [-f|--format FORMAT]
 [-p|--no_partitions]
 [-t|--test]
 [RAID set]{0,}

{-b|--block_devices}
 [-c|--display_columns]{0,2}
 [-d|--debug]{0,} [-v|--verbose]{0,}

{-h|--help}

{-l|--list_formats}
 [-d|--debug]{0,} [-v|--verbose]{0,}

{-n|--native_log}
 [-d|--debug]{0,} [-v|--verbose]{0,}
 [-f|--format FORMAT]
 [device-path]{0,}

{-r|--raid_devices}
 [-c|--display_columns]{0,2}
 [-d|--debug]{0,} [-v|--verbose]{0,}
 [-D|--dump_metadata]
 [-E|--erase_metadata]
 [-f|--format FORMAT]
 [device-path]{0,}

{-s|--sets}[a[ctive]/i[nactive]]
 [-c|--display_columns{0,3}]
 [-d|--debug]{0,} [-v|--verbose]{0,}
 [-f|--format FORMAT]
 [-g|--display_group]
 [RAID set]{0,}

{-V/--version}



 

DESCRIPTION

dmraid discovers block and software RAID devices (eg, ATARAID) by using multiple different metadata format handlers which support various formats (eg, Highpoint 37x series). It offers activating RAID sets made up by 2 or more discovered RAID devices, display properties of devices and sets. See option -l for supported metadata formats. Block device access to activated RAID sets happens through device-mapper nodes /dev/mapper/RaidSetName. RaidSetName starts with the format name (see -l option) which can be used to access all RAID sets of a specific format easily with certain options (eg, -a below).

 

OPTIONS

-a, --activate {y|n} [RAID set]{0,}
Activates or deactivates a software RAID set. In case metadata format handlers are chosen with -f , only RAID sets with such format(s) can be activated or deactivated. Useful if devices have multiple metadata signatures. When activating RAID sets, -p disables the activation of partitions on them. RAID set names given on command line don't need to be fully specified (eg, "dmraid -ay sil" would activate all discovered Silicon Image Medley RAID sets).

{-b|--block_devices}
List all discovered block devices with their properties (size, serial number). Add -c to display block device names only and -cc for CSV column output of block device properties.

[-d|--debug]{0,}
Enable debugging output. Opion can be given multiple times increasing the debug output level.

[-c|--display_columns]
Display properties of block devices, RAID sets and devices in column(s).

[-f|--format FORMAT[,FORMAT]{0,}]
Use metadata format handler(s) to discover RAID devices. See -l for a list of supported format handler names. This is useful to select particular formats in case multiple metadata signatures are found on a device. A comma seperated list of format names can be specified which may not contain white space.

{-h|--help}
Display help text.

{-l|--list_formats}
List all available metadata format handlers with their names and descriptions.

{-n|--native_log} [device-path]{0,}
Display metadata in native, vendor-specific format. In case a metadata format handler is chosen with -f only RAID devices with such format will be displayed in native format. If device-path(s) is/are given on the command line, native metadata output is restricted to those listed.

{-r|--raid_devices} [device-path]{0,}
List all discovered RAID devices with format, RAID level, sectors used and data offset into the device. In case a metadata format handler is chosen with -f , only RAID devices with such format can be discovered. Useful if devices have multiple metadata signatures. If -D is added to -r the RAID metadata gets dumped into files named devicename_{copy_}formatname.dat. The offset in sectors where the metadata is located on the device is written into files named devicename_{copy_}formatname.offset. If -E is added to -r the RAID metadata on the devices gets conditionally erased. Useful to erase old metadata after new one of different type has been stored on a device in order to avoid discovering both. If you enter -E option -D will be enforced in order to have a fallback in case the wrong metadata got erased. Manual copying back onto the device is needed to recover from erasing the wrong metadata using the dumped files devicename_{copy_}formatname.dat and devicename_{copy_}formatname.offset. If device-path(s) is/are given on the command line, the above actions are restricted to those listed. Add -c to display RAID device names only and -cc for CSV column output of RAID device properties.

-s [a/i] [RAID set]{0,}
Display properties of RAID sets. Multiple RAID set names can be given on the command line which don't need to be fully specified (eg, "dmraid -s hpt" would display all discovered Highpoint RAID sets) Add -c to display names of RAID sets only, -cc for CSV column output of RAID set properties and -ccc for inclusion of block devices in the listing. Add -g to include information about group RAID sets (as with Intel Software RAID) in the listing.

[-v|--verbose]{0,}
Enable verbose runtime information output. Opion can be given multiple times increasing the verbosity level.

 

EXAMPLES

"dmraid -l" lists all supported metadata formats with their names along with some descriptive information, eg:
hpt37x : (+) Highpoint HPT37X
hpt45x : (+) Highpoint HPT45X
isw : (+) Intel Software RAID
lsi : (0) LSI Logic MegaRAID
pdc : (+) Promise FastTrack
sil : (+) Silicon Image(tm) Medley(tm)
dos : (+) DOS partitions on SW RAIDs
(0): Discover, (+): Discover+Activate

"dmraid -ay" activates all software RAID sets discovered.

"dmraid -an" deactivates all active software RAID sets which are not open (eg, mounted filesystem on them).

"dmraid -ay -f pdc" (pdc looked up from "dmraid -l") activates all software RAID sets with Promise format discovered and ignores any other formats.

"dmraid -r" discovers all software RAID devices supported on your system, eg:
/dev/hde: hpt45x_chidjhaiaa-a, "hpt45x", stripe, 320172928 sectors, data@ 0
/dev/hdg: hpt45x_chidjhaiaa-a, "hpt45x", stripe, 320172928 sectors, data@ 0
/dev/hdi: hpt45x_chidjhaiaa-b, "hpt45x", stripe, 320172928 sectors, data@ 0
/dev/hdk: hpt45x_chidjhaiaa-b, "hpt45x", stripe, 320172928 sectors, data@ 0

"dmraid -s hpt45x_chidjhaiaa" displays properties of set "hpt45x_chidjhaiaa", eg:
*** Superset
name : hpt45x_chidjhaiaa
size : 640345856
stride: 128
type : raid10
status: operational
dev : 4
---> Subset
name : hpt45x_chidjhaiaa-a
size : 640345856
stride: 128
type : stripe
status: operational
dev : 2
/dev/hde: hpt45x_chidjhaiaa-a, "hpt45x", stripe, 320172928 sectors, data@ 0
/dev/hdg: hpt45x_chidjhaiaa-a, "hpt45x", stripe, 320172928 sectors, data@ 0
---> Subset
name : hpt45x_chidjhaiaa-b
size : 640345856
stride: 128
type : stripe
status: operational
dev : 2
/dev/hdi: hpt45x_chidjhaiaa-b, "hpt45x", stripe, 320172928 sectors, data@ 0
/dev/hdk: hpt45x_chidjhaiaa-b, "hpt45x", stripe, 320172928 sectors, data@ 0

"dmraid -ccs hpt45" displays properties in column format of all sets with hpt45* format, eg:
hpt45x_chidjhaiaa,640345856,128,raid10,operational,4
hpt45x_chidjhaiaa-a,640345856,128,stripe,operational,2
hpt45x_chidjhaiaa-b,640345856,128,stripe,operational,2

 

DIAGNOSTICS

dmraid returns an exit code of 0 for success or 1 for error.

 

AUTHOR

Heinz Mauelshagen <Mauelshagen@RedHat.com>


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
DIAGNOSTICS
AUTHOR
blog comments powered by Disqus