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

DESCRIPTION

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

EXAMPLES

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

DIAGNOSTICS

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

AUTHOR

441       Heinz Mauelshagen <Mauelshagen@RedHat.com>
442
443
444
445Heinz Mauelshagen                 DMRAID TOOL                        DMRAID(8)
Impressum