1DMRAID(8)                   System Manager's Manual                  DMRAID(8)
2
3
4

NAME

6       dmraid - discover, configure and activate software (ATA)RAID
7

SYNOPSIS

9       dmraid
10        {-a|--activate} {y|n|yes|no}
11        [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking]
12        [-f|--format FORMAT[,FORMAT...]]
13        [{-P|--partchar} CHAR]
14        [-p|--no_partitions]
15        [-Z|--rm_partitions]
16        [--separator SEPARATOR]
17        [-t|--test]
18        [RAID-set...]
19
20       dmraid
21        {-b|--block_devices}
22        [-c|--display_columns][FIELD[,FIELD...]]...
23        [-d|--debug]... [-v|--verbose]...
24        [--separator SEPARATOR]
25        [device-path...]
26
27       dmraid
28        {-h|--help}
29
30       dmraid
31        {-l|--list_formats}
32        [-d|--debug]... [-v|--verbose]...
33
34       dmraid
35        {-n|--native_log}
36        [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking]
37        [-f|--format FORMAT[,FORMAT...]]
38        [--separator SEPARATOR]
39        [device-path...]
40
41       dmraid
42        {-R| --rebuild}
43        RAID-set
44        [device-path]
45
46       dmraid
47        {-x| --remove}
48        [RAID-set]
49
50       dmraid
51        -f FORMAT-handler {-C| --create} set
52        --type raidlevel
53        [--size=setsize --strip stridesize]
54        --disk "device-path, device-path [, device-path ...]"
55
56       dmraid  [  -f|--format FORMAT-handler] -S|--spare [RAID-set] -M|--media
57       "device-path"
58
59       dmraid
60        {-r|--raid_devices}
61        [-c|--display_columns][FIELD[,FIELD...]]...
62        [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking]
63        [-D|--dump_metadata]
64        [-f|--format FORMAT[,FORMAT...]]
65        [--separator SEPARATOR]
66        [device-path...]
67
68       dmraid
69        {-r|--raid_devices}
70        [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking]
71        [-E|--erase_metadata]
72        [-f|--format FORMAT[,FORMAT...]]
73        [--separator SEPARATOR]
74        [device-path...]
75
76       dmraid
77        {-s|--sets}...[a|i|active|inactive]
78        [-c|--display_columns][FIELD[,FIELD...]]...
79        [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking]
80        [-f|--format FORMAT[,FORMAT...]]
81        [-g|--display_group]
82        [--separator SEPARATOR]
83        [RAID-set...]
84
85       dmraid
86        {-V/--version}
87
88

DESCRIPTION

90       dmraid discovers block and software RAID devices (eg, ATARAID) by using
91       multiple  different metadata format handlers which support various for‐
92       mats (eg, Highpoint 37x series).  It offers activating RAID  sets  made
93       up  by 2 or more discovered RAID devices, display properties of devices
94       and sets (see option -l for supported metadata formats).  Block  device
95       access  to activated RAID sets occurs via device-mapper nodes /dev/map‐
96       per/RaidSetName.  RaidSetName starts  with  the  format  name  (see  -l
97       option)  which can be used to access all RAID sets of a specific format
98       easily with certain options (eg, -a below).
99
100
101   OPTIONS
102       -a, --activate {y|n} [RAID set...]
103              Activates or deactivates all or particular  software  RAID  set.
104              In  case metadata format handlers are chosen with -f , only RAID
105              sets with such format(s) can be activated or deactivated.   Use‐
106              ful if devices have multiple metadata signatures.  When activat‐
107              ing RAID sets, -p disables the activation of partitions on them,
108              and -Z will make dmraid tell the kernel to remove the partitions
109              from the disks underlying the set, ie if sda is part of the set,
110              remove   sda1,  sda2,  etc.   This  prevents  applications  from
111              directly accessiong the disks bypassing dmraid.  RAID set  names
112              given  on  command  line  don't  need to be fully specified (eg,
113              "dmraid -ay sil" would activate  all  discovered  Silicon  Image
114              Medley RAID sets).
115
116
117       {-b|--block_devices} [device-path...]
118              List all or particular discovered block devices with their prop‐
119              erties (size, serial number).  Add -c to  display  block  device
120              names only and -cc for CSV column output of block device proper‐
121              ties.  See description of -c below for FIELD identifiers.
122
123
124       [-d|--debug]...
125              Enable debugging output.  Opion  can  be  given  multiple  times
126              increasing the debug output level.
127
128
129       [-c|--display_columns][FIELD[,FIELD...]]...
130              Display  properties  of  block devices, RAID sets and devices in
131              column(s).  Optional list specifying which FIELDs to display.
132              For -b:
133              d[evpath]|p[ath], sec[tors]|si[ze], ser[ialnumber].
134              For -r:
135              de[vpath]|p[ath],  f[ormat],   r[aidname],   t[ype],   st[atus],
136              se[ctors]|si[ze], da[taoffset]|o[ffset].
137              For -s:
138              f[ormat],     r[aidname],     t[ype],     sta[tus],    str[ide],
139              se[ctors]|si[ze], su[bsets], d[evices], sp[ares].
140
141       [-f|--format FORMAT[,FORMAT...]]
142              Use metadata format handler(s) to discover RAID devices.  See -l
143              for  a list of supported format handler names. This is useful to
144              select particular formats in case multiple  metadata  signatures
145              are  found  on  a device. A comma seperated list of format names
146              can be specified which may not contain white space.
147
148
149       {-h|--help}
150              Display help text.
151
152
153       {-i|--ignorelocking}
154              Don't take  out  any  locks.  Useful  in  early  boot  where  no
155              read/write access to /var is available.
156
157
158       {-l|--list_formats}
159              List all available metadata format handlers with their names and
160              descriptions. Supported RAID levels are listed in parenthesis:
161
162              S: Span (concatination)
163              0: RAID0 (stripe)
164              1: RAID1 (mirror)
165              10: RAID10 (mirror on top of stripes)
166              01: RAID10 (stripe on top of mirrors) Note: Intel OROM  displays
167              this as RAID10
168
169
170       {-n|--native_log} [device-path...]
171              Display  metadata  in native, vendor-specific format.  In case a
172              metadata format handler is chosen with -f only RAID devices with
173              such  format  will  be  displayed  in native format.  If device-
174              path(s) is/are given on the command line, native metadata output
175              is restricted to those listed.
176
177       [{-P|--partchar} CHAR]
178              Use CHAR as the separator between the device name and the parti‐
179              tion number.
180
181       {-R| --rebuild} RAID-set [device-path]
182              Rebuild raid array after a drive has failed and a new  drive  is
183              added.   For  Intel chipset based systems, there are two methods
184              in which a new drive is added to the system.
185
186              1. Using OROM to identify a new drive
187                  During system reboot, enter OROM and mark the new  drive  as
188              the rebuild drive.
189                  After booting to the OS, use the dmraid command to rebuild.
190
191                  Example: dmraid -R raid_set
192
193              2. Using dmraid to identify a new drive
194                  Boot to the OS and use the dmraid command with the new drive
195              as the second parameter.
196
197                  Example: dmraid -R raid_set /dev/sdc
198
199              3. Using hot spare drive
200                  Mark a drive as hot spare using the "dmraid -f isw -S"  com‐
201              mand. Then use the dmraid command to start the rebuild.
202
203                  Example: dmraid -R raid_set
204
205
206       {-x|--remove} [RAID-set]
207              Delete  one or all existing software RAID devices from the meta‐
208              data.
209
210
211       -f  FORMAT-handler  {-C|--create}  --type   raidlevel   [--size=setsize
212       --strip stripsize] --disk device-path, device-path [,device-path]
213              Delete one or all existing Configure a software RAID device  and
214              store the configuration data in a group of  hard  drive  devices
215              consisting  of  this  array. This command requires the following
216              options:
217
218              -f FORMAT-handler
219                   metadata format (see "dmraid -l")
220              --type digit[digit...]
221                   specify the raid level of the software RAID set.
222                        0:  raid0
223                        1:  raid1
224                        5:  raid5
225                        01: raid01 (isw raid10)
226              --size: [digits[k|K|m|M|g|G][b|B]]
227                   specify the size of the RAID set.The number is  an  integer
228              followed by [kKmMgG] and/or [bB].
229                        b: byte (default)
230                        B: block (512 bytes)
231                        K or K: on the base of 1024
232                        m or M: on the base of 1024*1024
233                        g or G: on the base of 1024*1024*1024
234              If  this  option  is missing, it's set to the default value pre-
235              configured by the vendor. Note that different vendors may  apply
236              different constraints on the granularity of the size or the min‐
237              imal value.
238              --strip: [digits[k|K|m|M|g|G][b|B]]
239                   specify the strip size of a RAID1, RAID5, and  RAID10  RAID
240              set (as above)
241              --disk: device-path[{,| }device-path...]
242                   specify the array of the hard drives, e.g. /dev/sda.
243
244
245       -f FORMAT-handler -S -M device-path
246              -S -M device-path
247
248              This command adds hot spare support for one or more RAID sets.
249
250              1.  When  used  with  a format handler, which supports hot spare
251              sets (e.g. isw), a hot spare is marked to be used when  rebuild‐
252              ing any RAID set of that format.  2. When used when specifying a
253              RAID set, the drive is added to that RAID set and will  be  used
254              only  to  rebuild that set. Note: If the specified name does not
255              match an existing RAID-set, a set with the new name will be cre‐
256              ated.
257
258
259       {-r|--raid_devices} [device-path...]
260              List  all  discovered RAID devices with format, RAID level, sec‐
261              tors used and data offset into the device.  In case  a  metadata
262              format  handler  is chosen with -f , only RAID devices with such
263              format can be discovered. Useful if devices have multiple  meta‐
264              data  signatures.   If  -D is added to -r the RAID metadata gets
265              dumped into a subdirectory named  dmraid.format_name  (eg.  for‐
266              mat_name  = isw) in files named devicename.dat.  The byte offset
267              where the metadata is located on  the  device  is  written  into
268              files named devicename.offset and the size of the device in sec‐
269              tors into files named devicename.size.
270
271              If -E is added to -r the RAID metadata on the devices gets  con‐
272              ditionally  erased.   Useful to erase old metadata after new one
273              of different type has been stored on a device in order to  avoid
274              discovering  both. If you enter -E option -D will be enforced in
275              order to have a fallback in case the wrong metadata got  erased.
276              Manual  copying  back  onto the device is needed to recover from
277              erasing the  wrong  metadata  using  the  dumped  files  device‐
278              name_formatname.dat  and  devicename_formatname.offset.   Eg, to
279              restore all *.dat files in the working directory to the  respec‐
280              tive devices:
281
282              for f in *.dat
283              do
284                   dd if=$f of=/dev/${f%%.dat} \
285                   seek=`cat ${f%%dat}offset` bs=1
286              done
287
288              If  device-path(s)  is/are  given on the command line, the above
289              actions are restricted to those listed.  Add -c to display  RAID
290              device  names  only and -cc for CSV column output of RAID device
291              properties.  See description of -c above for FIELD identifiers.
292
293
294       --separator SEPARATOR
295              Use SEPARATOR as a delimiter for all options taking or  display‐
296              ing lists.
297
298
299       -s... [a|i] [RAID-set...]
300              Display  properties of RAID sets. Multiple RAID set names can be
301              given on the command line which don't need to be fully specified
302              (eg, "dmraid -s hpt" would display all discovered Highpoint RAID
303              sets). Enter -s twice to display RAID subsets too.   Add  -c  to
304              display  names  of  RAID sets only, -cc for CSV column output of
305              RAID set properties and -ccc for inclusion of block  devices  in
306              the  listing.  Doesn't imply -s -s to show RAID subsets (implied
307              for group sets, e.g. isw).  Add -g to include information  about
308              group  RAID  sets  (as with Intel Software RAID) in the listing.
309              See description of -c above for FIELD identifiers.   Note:  Size
310              is given in sectors (not bytes).
311
312
313       [-v|--verbose]...
314              Enable  verbose  runtime  information output. Opion can be given
315              multiple times increasing the verbosity level.
316
317

EXAMPLES

319       "dmraid -l" lists all supported metadata formats with their names along
320       with some descriptive information, eg:
321       hpt37x : (+) Highpoint HPT37X
322       hpt45x : (+) Highpoint HPT45X
323       isw    : (+) Intel Software RAID
324       lsi    : (0) LSI Logic MegaRAID
325       nvidia : (+) NVidia RAID
326       pdc    : (+) Promise FastTrack
327       sil    : (+) Silicon Image(tm) Medley(tm)
328       via    : (+) VIA Software RAID
329       dos    : (+) DOS partitions on SW RAIDs
330       (0): Discover, (+): Discover+Activate
331
332       "dmraid -ay" activates all software RAID sets discovered.
333
334       "dmraid  -an"  deactivates  all active software RAID sets which are not
335       open (eg, mounted filesystem on them).
336
337       "dmraid -ay -f pdc" (pdc looked up  from  "dmraid  -l")  activates  all
338       software RAID sets with Promise format discovered and ignores all other
339       supported formats.
340
341       "dmraid -r" discovers all software RAID devices supported on your  sys‐
342       tem, eg:
343       /dev/dm-46:  hpt45x, "hpt45x_chidjhaiaa-0", striped, ok, 320172928 sec‐
344       tors, data@ 0
345       /dev/dm-50: hpt45x, "hpt45x_chidjhaiaa-0", striped, ok, 320172928  sec‐
346       tors, data@ 0
347       /dev/dm-54:  hpt45x, "hpt45x_chidjhaiaa-1", striped, ok, 320172928 sec‐
348       tors, data@ 0
349       /dev/dm-58: hpt45x, "hpt45x_chidjhaiaa-1", striped, ok, 320172928  sec‐
350       tors, data@ 0
351
352
353       "dmraid   -s   -s   hpt45x_chidjhaiaa"   displays   properties  of  set
354       "hpt45x_chidjhaiaa", eg:
355       *** Superset
356       name   : hpt45x_chidjhaiaa
357       size   : 640345856
358       stride : 128
359       type   : raid10
360       status : ok
361       subsets: 2
362       dev    : 4
363       spare  : 0
364       ---> Subset
365       name   : hpt45x_chidjhaiaa-0
366       size   : 640345856
367       stride : 128
368       type   : stripe
369       status : ok
370       subsets: 0
371       dev    : 2
372       spare  : 0
373       ---> Subset
374       name   : hpt45x_chidjhaiaa-1
375       size   : 640345856
376       stride : 128
377       type   : stripe
378       status : ok
379       subsets: 0
380       dev    : 2
381       spare  : 0
382
383       "dmraid -s -ccs hpt45" displays properties in column format of all sets
384       and subsets with hpt45* format, eg:
385       hpt45x_chidjhaiaa,640345856,128,raid10,ok,4,0
386       hpt45x_chidjhaiaa-a,640345856,128,stripe,ok,2,0
387       hpt45x_chidjhaiaa-b,640345856,128,stripe,ok,2,0
388
389       "dmraid  -r --sep : -cpath:size" display paths and sizes in sectors for
390       RAID devices in column format using ':' as a delimiter, eg:
391       /dev/dm-8:320173055
392       /dev/dm-12:320173055
393       /dev/dm-22:320173055
394       /dev/dm-26:320173055
395       /dev/dm-30:586114703
396       /dev/dm-34:586114703
397       /dev/dm-38:586114703
398       /dev/dm-42:586114703
399       /dev/dm-46:156301487
400       /dev/dm-50:156301487
401       /dev/dm-54:390624896
402       /dev/dm-58:390624896
403       /dev/dm-62:390624896
404       /dev/dm-66:390624896
405
406       "dmraid -f isw -C Raid0 --type 0 --strip 8k --size 20g --disk "/dev/sdb
407       /dev/sdc"" creates an ISW volume with a name of "Raid0", 20Gig bytes in
408       total, and 8kilo bytes strip size on two disks.
409
410       "dmraid -f isw -C Test0 --type 0 --disk "/dev/sdd /dev/sde"" creates an
411       ISW volume with the default size and strip size.
412
413       "dmraid  -f  isw  -C  Test10  --type  01  --strip 128B --disk "/dev/sda
414       /dev/sdb /dev/sdc /dev/sdd" creates a stacked RAID device, RAID10  (isw
415       format),  with  a  name of "Test10", 128 blocks (512bytes) strip size ,
416       and the default volume size on 4 disks.
417
418       "dmraid -f isw -S -M /dev/sde" marks the device /dev/sde as a hot spare
419       for rebuild
420
421       "dmraid  -R  isw_djaggchdde_RAID1  /dev/sde" starts rebuild of the RAID
422       volume on device /dev/sde
423
424

DIAGNOSTICS

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

AUTHOR

430       Heinz Mauelshagen <Mauelshagen@RedHat.com>
431
432
433
434Heinz Mauelshagen                 DMRAID TOOL                        DMRAID(8)
Impressum