~xnox/ubuntu/quantal/mdadm/merge

« back to all changes in this revision

Viewing changes to ReadMe.c

  • Committer: Dmitrijs Ledkovs
  • Author(s): Surbhi Palande
  • Date: 2010-09-30 17:46:19 UTC
  • mfrom: (1.1.25 sid)
  • Revision ID: dmitrijs.ledkovs@canonical.com-20100930174619-cqsokylnluraiyr8
Tags: 3.1.4-1+8efb9d1ubuntu1
* Merge from debian unstable. (LP: #603582) 
* Remaining changes
  - Assemble.c, config.c: upgraded to the mdadm-3.1.4 version of these files
    from Debian.
  - debian/control: we need udev and util-linux in the right version. We
    also remove the build dependency from quilt and docbook-to-man as both
    are not used in Ubuntus mdadm.
  - debian/initramfs/hook: kept the Ubuntus version for handling the absence
    of active raid arrays in <initramfs>/etc/mdadm/mdadm.conf
  - debian/initramfs/script.local-top.DEBIAN, debian/mdadm-startall,
    debian/mdadm.raid.DEBIAN: removed. udev does its job now instead.
  - debian/mdadm-startall.sgml, debian/mdadm-startall.8: documentation of
    unused startall script
  - debian/mdadm.config, debian/mdadm.postinst - let udev do the handling
    instead. Resolved merge conflict by keeping Ubuntu's version.
  - debian/rules: kept debian's switch to using dh_lintian
  - debian/mdadm.links, debian/mdadm.manpages: dropped owing to the fact
    that these are not used in Ubuntu. Also dropped the build-dep on docbook
    to man)
  - debian/mdadm.postinst, debian/mdadm.config, initramfs/init-premount:
    boot-degraded enablement; maintain udev starting of RAID devices;
    init-premount hook script for the initramfs, to provide information at
    boot
  - debian/mkconf.in is the older mkconf. Kept the Ubuntus version.
  - debian/rules: Kept Ubuntus version for installing apport hooks, not
    installing un-used startall script and for adding a udev rule
    corresponding to mdadm.
  - debian/install-rc, check.d/_numbers, check.d/root_on_raid: Ubuntu partman
    installer changes
  - debian/presubj: Dropped this unused bug reporting file. Instead use
    source_mdadm.py act as an apport hook for bug handling.
  - rename debian/mdadm.vol_id.udev to debian/mdadm.mdadm-blkid.udev so that
    the rules file ends up with a more reasonable name

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * mdadm - manage Linux "md" devices aka RAID arrays.
3
3
 *
4
 
 * Copyright (C) 2001-2007 Neil Brown <neilb@suse.de>
 
4
 * Copyright (C) 2001-2010 Neil Brown <neilb@suse.de>
5
5
 *
6
6
 *
7
7
 *    This program is free software; you can redistribute it and/or modify
24
24
 
25
25
#include "mdadm.h"
26
26
 
27
 
char Version[] = Name " - v2.6.7.1 - 15th October 2008\n";
 
27
char Version[] = Name " - v3.1.4 - 31st August 2010\n";
28
28
 
29
29
/*
30
30
 * File: ReadMe.c
86
86
 *     At the time if writing, there is only minimal support.
87
87
 */
88
88
 
89
 
char short_options[]="-ABCDEFGIQhVXWvqbc:i:l:p:m:n:x:u:c:d:z:U:sarfRSow1tye:";
 
89
char short_options[]="-ABCDEFGIQhVXWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
90
90
char short_bitmap_options[]=
91
 
                   "-ABCDEFGIQhVXWvqb:c:i:l:p:m:n:x:u:c:d:z:U:sarfRSow1tye:";
 
91
                   "-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
92
92
char short_bitmap_auto_options[]=
93
 
                   "-ABCDEFGIQhVXWvqb:c:i:l:p:m:n:x:u:c:d:z:U:sa:rfRSow1tye:";
 
93
                   "-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:";
94
94
 
95
95
struct option long_options[] = {
96
96
    {"manage",    0, 0, '@'},
107
107
    {"query",     0, 0, 'Q'},
108
108
    {"examine-bitmap", 0, 0, 'X'},
109
109
    {"auto-detect", 0, 0, AutoDetect},
 
110
    {"detail-platform", 0, 0, DetailPlatform},
 
111
    {"kill-subarray", 1, 0, KillSubarray},
 
112
    {"update-subarray", 1, 0, UpdateSubarray},
110
113
 
111
114
    /* synonyms */
112
115
    {"monitor",   0, 0, 'F'},
138
141
    {"write-mostly",0, 0, 'W'},
139
142
    {"re-add",    0, 0,  ReAdd},
140
143
    {"homehost",  1, 0,  HomeHost},
 
144
#if 0
141
145
    {"auto-update-homehost", 0, 0, AutoHomeHost},
 
146
#endif
142
147
    {"symlinks",  1, 0,  Symlinks},
143
148
 
144
149
    /* For assemble */
161
166
    {"readwrite", 0, 0, 'w'},
162
167
    {"no-degraded",0,0,  NoDegraded },
163
168
    {"wait",      0, 0, 'W'},
 
169
    {"wait-clean", 0, 0, Waitclean },
164
170
 
165
171
    /* For Detail/Examine */
166
172
    {"brief",     0, 0, 'b'},
172
178
    {"mail",      1, 0, 'm'},
173
179
    {"program",   1, 0, 'p'},
174
180
    {"alert",     1, 0, 'p'},
 
181
    {"increment", 1, 0, 'r'},
175
182
    {"delay",     1, 0, 'd'},
176
183
    {"daemonise", 0, 0, 'f'},
177
184
    {"daemonize", 0, 0, 'f'},
180
187
    {"syslog",    0, 0, 'y'},
181
188
    /* For Grow */
182
189
    {"backup-file", 1,0, BackupFile},
 
190
    {"array-size", 1, 0, 'Z'},
183
191
 
184
192
    /* For Incremental */
185
193
    {"rebuild-map", 0, 0, 'r'},
207
215
"       mdadm --grow options device\n"
208
216
"            resize/reshape an active array\n"
209
217
"       mdadm --incremental device\n"
210
 
"            add a device to an array as appropriate\n"
 
218
"            add/remove a device to/from an array as appropriate\n"
211
219
"       mdadm --monitor options...\n"
212
220
"            Monitor one or more array for significant changes.\n"
213
221
"       mdadm device options...\n"
250
258
"  --examine-bitmap -X: Display the detail of a bitmap file\n"
251
259
"  --monitor     -F   : monitor (follow) some arrays\n"
252
260
"  --grow        -G   : resize/ reshape and array\n"
253
 
"  --incremental -I   : add a single device to an array as appropriate\n"
 
261
"  --incremental -I   : add/remove a single device to/from an array as appropriate\n"
254
262
"  --query       -Q   : Display general information about how a\n"
255
263
"                       device relates to the md driver\n"
256
264
"  --auto-detect      : Start arrays auto-detected by the kernel\n"
269
277
"  --size=       -z   : Size (in K) of each drive in RAID1/4/5/6/10 - optional\n"
270
278
"  --force       -f   : Honour devices as listed on command line.  Don't\n"
271
279
"                     : insert a missing drive for RAID5.\n"
272
 
"  --auto(=p)    -a   : Automatically allocate new (partitioned) md array if needed.\n"
273
280
"  --assume-clean     : Assume the array is already in-sync. This is dangerous.\n"
274
281
"  --bitmap-chunk=    : chunksize of bitmap in bitmap file (Kilobytes)\n"
275
282
"  --delay=      -d   : seconds between bitmap updates\n"
287
294
"  --scan        -s   : scan config file for missing information\n"
288
295
"  --force       -f   : Assemble the array even if some superblocks appear out-of-date\n"
289
296
"  --update=     -U   : Update superblock: try '-A --update=?' for list of options.\n"
290
 
"  --auto(=p)    -a   : Automatically allocate new (partitioned) md array if needed.\n"
291
297
"  --no-degraded      : Do not start any degraded arrays - default unless --scan.\n"
292
298
"\n"
293
299
" For detail or examine:\n"
465
471
"  --query       -Q   : Display general information about how a\n"
466
472
"                       device relates to the md driver\n"
467
473
"  --detail      -D   : Display details of an array\n"
 
474
"  --detail-platform  : Display hardware/firmware details\n"
468
475
"  --examine     -E   : Examine superblock on an array component\n"
469
476
"  --examine-bitmap -X: Display contents of a bitmap file\n"
470
477
"  --zero-superblock  : erase the MD superblock from a device.\n"
492
499
"  --mail=       -m   : Address to mail alerts of failure to\n"
493
500
"  --program=    -p   : Program to run when an event is detected\n"
494
501
"  --alert=           : same as --program\n"
 
502
"  --increment=  -r   : Report RebuildNN events in the given increment. default=20\n"
495
503
"  --delay=      -d   : seconds of delay between polling state. default=60\n"
496
504
"  --config=     -c   : specify a different config file\n"
497
505
"  --scan        -s   : find mail-address/program in config file\n"
517
525
"  --layout=      -p   : For a FAULTY array, set/change the error mode.\n"
518
526
"  --size=        -z   : Change the active size of devices in an array.\n"
519
527
"                      : This is useful if all devices have been replaced\n"
520
 
"                      : with larger devices.\n"
521
 
"  --raid-disks=  -n   : Change the number of active devices in an array.\n"
522
 
"                      : array.\n"
 
528
"                      : with larger devices.   Value is in Kilobytes, or\n"
 
529
"                      : the special word 'max' meaning 'as large as possible'.\n"
 
530
"  --raid-devices= -n  : Change the number of active devices in an array.\n"
523
531
"  --bitmap=      -b   : Add or remove a write-intent bitmap.\n"
 
532
"  --backup-file= file : A file on a differt device to store data for a\n"
 
533
"                      : short time while increasing raid-devices on a\n"
 
534
"                      : RAID4/5/6 array. Not needed when a spare is present.\n"
 
535
"  --array-size=  -Z   : Change visible size of array.  This does not change\n"
 
536
"                      : any data on the device, and is not stable across restarts.\n"
524
537
;
525
538
 
526
539
char Help_incr[] =
527
 
"Usage: mdadm --incremental [-Rqrs] device\n"
 
540
"Usage: mdadm --incremental [-Rqrsf] device\n"
528
541
"\n"
529
542
"This usage allows for incremental assembly of md arrays.  Devices can be\n"
530
543
"added one at a time as they are discovered.  Once an array has all expected\n"
531
544
"devices, it will be started.\n"
532
545
"\n"
533
 
"Options that are valid with incremental assembly (-I --incremental) more are:\n"
534
 
"  --run       -R  : run arrays as soon as a minimal number of devices are\n"
535
 
"                  : present rather than waiting for all expected.\n"
536
 
"  --quiet     -q  : Don't print any information messages, just errors.\n"
537
 
"  --rebuild   -r  : Rebuild the 'map' file that mdadm uses for tracking\n"
538
 
"                  : partial arrays.\n"
539
 
"  --scan      -s  : Use with -R to start any arrays that have the minimal\n"
540
 
"                  : required number of devices, but are not yet started.\n"
 
546
"Optionally, the process can be reversed by using the fail option.\n"
 
547
"When fail mode is invoked, mdadm will see if the device belongs to an array\n"
 
548
"and then both fail (if needed) and remove the device from that array.\n"
 
549
"\n"
 
550
"Options that are valid with incremental assembly (-I --incremental) are:\n"
 
551
"  --run         -R : Run arrays as soon as a minimal number of devices are\n"
 
552
"                   : present rather than waiting for all expected.\n"
 
553
"  --quiet       -q : Don't print any information messages, just errors.\n"
 
554
"  --rebuild-map -r : Rebuild the 'map' file that mdadm uses for tracking\n"
 
555
"                   : partial arrays.\n"
 
556
"  --scan        -s : Use with -R to start any arrays that have the minimal\n"
 
557
"                   : required number of devices, but are not yet started.\n"
 
558
"  --fail      -f  : First fail (if needed) and then remove device from\n"
 
559
"                  : any array that it is a member of.\n"
541
560
;
542
561
 
543
562
char Help_config[] =
578
597
/* name/number mappings */
579
598
 
580
599
mapping_t r5layout[] = {
581
 
        { "left-asymmetric", 0},
582
 
        { "right-asymmetric", 1},
583
 
        { "left-symmetric", 2},
584
 
        { "right-symmetric", 3},
585
 
 
586
 
        { "default", 2},
587
 
        { "la", 0},
588
 
        { "ra", 1},
589
 
        { "ls", 2},
590
 
        { "rs", 3},
 
600
        { "left-asymmetric", ALGORITHM_LEFT_ASYMMETRIC},
 
601
        { "right-asymmetric", ALGORITHM_RIGHT_ASYMMETRIC},
 
602
        { "left-symmetric", ALGORITHM_LEFT_SYMMETRIC},
 
603
        { "right-symmetric", ALGORITHM_RIGHT_SYMMETRIC},
 
604
 
 
605
        { "default", ALGORITHM_LEFT_SYMMETRIC},
 
606
        { "la", ALGORITHM_LEFT_ASYMMETRIC},
 
607
        { "ra", ALGORITHM_RIGHT_ASYMMETRIC},
 
608
        { "ls", ALGORITHM_LEFT_SYMMETRIC},
 
609
        { "rs", ALGORITHM_RIGHT_SYMMETRIC},
 
610
 
 
611
        { "parity-first", ALGORITHM_PARITY_0},
 
612
        { "parity-last", ALGORITHM_PARITY_N},
 
613
        { "ddf-zero-restart", ALGORITHM_RIGHT_ASYMMETRIC},
 
614
        { "ddf-N-restart", ALGORITHM_LEFT_ASYMMETRIC},
 
615
        { "ddf-N-continue", ALGORITHM_LEFT_SYMMETRIC},
 
616
 
 
617
        { NULL, 0}
 
618
};
 
619
mapping_t r6layout[] = {
 
620
        { "left-asymmetric", ALGORITHM_LEFT_ASYMMETRIC},
 
621
        { "right-asymmetric", ALGORITHM_RIGHT_ASYMMETRIC},
 
622
        { "left-symmetric", ALGORITHM_LEFT_SYMMETRIC},
 
623
        { "right-symmetric", ALGORITHM_RIGHT_SYMMETRIC},
 
624
 
 
625
        { "default", ALGORITHM_LEFT_SYMMETRIC},
 
626
        { "la", ALGORITHM_LEFT_ASYMMETRIC},
 
627
        { "ra", ALGORITHM_RIGHT_ASYMMETRIC},
 
628
        { "ls", ALGORITHM_LEFT_SYMMETRIC},
 
629
        { "rs", ALGORITHM_RIGHT_SYMMETRIC},
 
630
 
 
631
        { "parity-first", ALGORITHM_PARITY_0},
 
632
        { "parity-last", ALGORITHM_PARITY_N},
 
633
        { "ddf-zero-restart", ALGORITHM_ROTATING_ZERO_RESTART},
 
634
        { "ddf-N-restart", ALGORITHM_ROTATING_N_RESTART},
 
635
        { "ddf-N-continue", ALGORITHM_ROTATING_N_CONTINUE},
 
636
 
 
637
        { "left-asymmetric-6", ALGORITHM_LEFT_ASYMMETRIC_6},
 
638
        { "right-asymmetric-6", ALGORITHM_RIGHT_ASYMMETRIC_6},
 
639
        { "left-symmetric-6", ALGORITHM_LEFT_SYMMETRIC_6},
 
640
        { "right-symmetric-6", ALGORITHM_RIGHT_SYMMETRIC_6},
 
641
        { "parity-first-6", ALGORITHM_PARITY_0_6},
 
642
 
591
643
        { NULL, 0}
592
644
};
593
645
 
610
662
        { "raid10", 10},
611
663
        { "10", 10},
612
664
        { "faulty", LEVEL_FAULTY},
 
665
        { "container", LEVEL_CONTAINER},
613
666
        { NULL, 0}
614
667
};
615
668