~ubuntu-branches/ubuntu/gutsy/mdadm/gutsy

« back to all changes in this revision

Viewing changes to ReadMe.c

  • Committer: Package Import Robot
  • Author(s): Scott James Remnant
  • Date: 2007-07-11 10:31:39 UTC
  • mfrom: (1.2.1) (1.1.7 etch)
  • Revision ID: package-import@ubuntu.com-20070711103139-i4xr6bij2i0xbjho
Tags: 2.6.2-1ubuntu1
* Merge from debian unstable:
  - various Debian and Ubuntu changes dropped in favour of the changes
    outlined below.

* md activation:
  - We now have a single udev rule for both the real system and the
    initramfs, since doing things differently there will only result in bugs
    and confusion.
  - This rule runs "mdadm --assemble --scan --no-degraded", automatically
    activating any non-degraded device as their components are detected.
  - Drop the mdadm-raid init script, since this does the same thing.
  - Also drop mdadm-startall which uses the mdadm-raid init script, and its
    associated sgml file (thus dropping the build-dep on docbook-to-man)
  - Simplify the configuration, since we always autostart all devices so do
    not need to specify any required root devices, etc.
  - Drop the deprecated mdrun entirely.
  - Since udev autostarts arrays, much of the initramfs script can be
    dropped.

* Install a new udev rule at 65 which runs vol_id on clean raid arrays.
  This will cause lvm, etc. to be run (since there is vol_id information
  present for the enclosed filesystem).

* Depend on initramfs-tools, specifically a version that doesn't ship
  the mdrun script.  This way we can clean out a lot of the upgrade handling
  from the initramfs hook.
* Just get initramfs to load the modules for us

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-2006 Neil Brown <neilb@suse.de>
 
4
 * Copyright (C) 2001-2007 Neil Brown <neilb@suse.de>
5
5
 *
6
6
 *
7
7
 *    This program is free software; you can redistribute it and/or modify
19
19
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
20
 *
21
21
 *    Author: Neil Brown
22
 
 *    Email: <neilb@cse.unsw.edu.au>
23
 
 *    Paper: Neil Brown
24
 
 *           School of Computer Science and Engineering
25
 
 *           The University of New South Wales
26
 
 *           Sydney, 2052
27
 
 *           Australia
 
22
 *    Email: <neilb@suse.de>
28
23
 */
29
24
 
30
25
#include "mdadm.h"
31
26
 
32
 
char Version[] = Name " - v2.5.6 - 9 November 2006\n";
 
27
char Version[] = Name " - v2.6.2 - 21st May 2007\n";
33
28
 
34
29
/*
35
30
 * File: ReadMe.c
91
86
 *     At the time if writing, there is only minimal support.
92
87
 */
93
88
 
94
 
char short_options[]="-ABCDEFGQhVXvqbc:i:l:p:m:n:x:u:c:d:z:U:sarfRSow1tye:";
95
 
char short_bitmap_auto_options[]="-ABCDEFGQhVXvqb:c:i:l:p:m:n:x:u:c:d:z:U:sa:rfRSow1tye:";
 
89
char short_options[]="-ABCDEFGIQhVXWvqbc:i:l:p:m:n:x:u:c:d:z:U:sarfRSow1tye:";
 
90
char short_bitmap_auto_options[]=
 
91
                   "-ABCDEFGIQhVXWvqb:c:i:l:p:m:n:x:u:c:d:z:U:sa:rfRSow1tye:";
96
92
 
97
93
struct option long_options[] = {
98
94
    {"manage",    0, 0, '@'},
104
100
    {"examine",   0, 0, 'E'},
105
101
    {"follow",    0, 0, 'F'},
106
102
    {"grow",      0, 0, 'G'},
 
103
    {"incremental",0,0, 'I'},
107
104
    {"zero-superblock", 0, 0, 'K'}, /* deliberately no a short_option */
108
105
    {"query",     0, 0, 'Q'},
109
106
    {"examine-bitmap", 0, 0, 'X'},
 
107
    {"auto-detect", 0, 0, AutoDetect},
110
108
 
111
109
    /* synonyms */
112
110
    {"monitor",   0, 0, 'F'},
160
158
    {"readonly",  0, 0, 'o'},
161
159
    {"readwrite", 0, 0, 'w'},
162
160
    {"no-degraded",0,0,  NoDegraded },
 
161
    {"wait",      0, 0, 'W'},
163
162
 
164
163
    /* For Detail/Examine */
165
164
    {"brief",     0, 0, 'b'},
 
165
    {"export",    0, 0, 'Y'},
166
166
    {"sparc2.2",  0, 0, Sparc22},
167
167
    {"test",      0, 0, 't'},
168
168
 
175
175
    {"daemonize", 0, 0, 'f'},
176
176
    {"oneshot",   0, 0, '1'},
177
177
    {"pid-file",  1, 0, 'i'},
 
178
    {"syslog",    0, 0, 'y'},
178
179
    /* For Grow */
179
180
    {"backup-file", 1,0, BackupFile},
180
 
    
 
181
 
 
182
    /* For Incremental */
 
183
    {"rebuild-map", 0, 0, 'r'},
181
184
    {0, 0, 0, 0}
182
185
};
183
186
 
199
202
"            make changes to an existing array.\n"
200
203
"       mdadm --misc options... devices\n"
201
204
"            report on or modify various md related devices.\n"
 
205
"       mdadm --grow options device\n"
 
206
"            resize/reshape an active array\n"
 
207
"       mdadm --incremental device\n"
 
208
"            add a device to an array as appropriate\n"
202
209
"       mdadm --monitor options...\n"
203
210
"            Monitor one or more array for significant changes.\n"
204
211
"       mdadm device options...\n"
229
236
"  --verbose     -v   : Be more verbose about what is happening\n"
230
237
"  --quiet       -q   : Don't print un-necessary messages\n"
231
238
"  --brief       -b   : Be less verbose, more brief\n"
 
239
"  --export      -Y   : With --detail, use key=value format for easy\n"
 
240
"                       import into environment\n"
232
241
"  --force       -f   : Override normal checks and be more forceful\n"
233
242
"\n"
234
243
"  --assemble    -A   : Assemble an array\n"
238
247
"  --examine     -E   : Examine superblock on an array component\n"
239
248
"  --examine-bitmap -X: Display the detail of a bitmap file\n"
240
249
"  --monitor     -F   : monitor (follow) some arrays\n"
 
250
"  --grow        -G   : resize/ reshape and array\n"
 
251
"  --incremental -I   : add a single device to an array as appropriate\n"
241
252
"  --query       -Q   : Display general information about how a\n"
242
253
"                       device relates to the md driver\n"
 
254
"  --auto-detect      : Start arrays auto-detected by the kernel\n"
243
255
;
244
256
/*
245
257
"\n"
295
307
"  --readonly    -o   : mark array as readonly\n"
296
308
"  --readwrite   -w   : mark array as readwrite\n"
297
309
"  --zero-superblock  : erase the MD superblock from a device.\n"
 
310
"  --wait        -W   : wait for recovery/resync/reshape to finish.\n"
298
311
;
299
312
*/
300
313
 
458
471
"  --readonly    -o   : mark array as readonly\n"
459
472
"  --readwrite   -w   : mark array as readwrite\n"
460
473
"  --test        -t   : exit status 0 if ok, 1 if degrade, 2 if dead, 4 if missing\n"
 
474
"  --wait        -W   : wait for resync/rebuild/recovery to finish\n"
461
475
;
462
476
 
463
477
char Help_monitor[] =
490
504
"\n"
491
505
"This usage causes mdadm to attempt to reconfigure a running array.\n"
492
506
"This is only possibly if the kernel being used supports a particular\n"
493
 
"reconfiguration.  This version only supports changing the number of\n"
494
 
"devices in a RAID1, and changing the active size of all devices in\n"
495
 
"a RAID1/4/5/6.\n"
 
507
"reconfiguration.  This version supports changing the number of\n"
 
508
"devices in a RAID1/5/6, changing the active size of all devices in\n"
 
509
"a RAID1/4/5/6, adding or removing a write-intent bitmap, and changing\n"
 
510
"the error mode for a 'FAULTY' array.\n"
496
511
"\n"
497
512
"Options that are valid with the grow (-G --grow) mode are:\n"
 
513
"  --level=       -l   : Tell mdadm what level the array is so that it can\n"
 
514
"                      : interpret '--layout' properly.\n"
 
515
"  --layout=      -p   : For a FAULTY array, set/change the error mode.\n"
498
516
"  --size=        -z   : Change the active size of devices in an array.\n"
499
517
"                      : This is useful if all devices have been replaced\n"
500
518
"                      : with larger devices.\n"
501
 
"  --raid-disks=  -n   : Change the number of active devices in a RAID1\n"
 
519
"  --raid-disks=  -n   : Change the number of active devices in an array.\n"
502
520
"                      : array.\n"
503
 
;
504
 
 
505
 
 
 
521
"  --bitmap=      -b   : Add or remove a write-intent bitmap.\n"
 
522
;
 
523
 
 
524
char Help_incr[] =
 
525
"Usage: mdadm --incremental [-Rqrs] device\n"
 
526
"\n"
 
527
"This usage allows for incremental assembly of md arrays.  Devices can be\n"
 
528
"added one at a time as they are discovered.  Once an array has all expected\n"
 
529
"devices, it will be started.\n"
 
530
"\n"
 
531
"Options that are valid with incremental assembly (-I --incremental) more are:\n"
 
532
"  --run       -R  : run arrays as soon as a minimal number of devices are\n"
 
533
"                  : present rather than waiting for all expected.\n"
 
534
"  --quiet     -q  : Don't print any information messages, just errors.\n"
 
535
"  --rebuild   -r  : Rebuild the 'map' file that mdadm uses for tracking\n"
 
536
"                  : partial arrays.\n"
 
537
"  --scan      -s  : Use with -R to start any arrays that have the minimal\n"
 
538
"                  : required number of devices, but are not yet started.\n"
 
539
;
506
540
 
507
541
char Help_config[] =
508
542
"The /etc/mdadm.conf config file:\n\n"
586
620
        { "misc", MISC},
587
621
        { "monitor", MONITOR},
588
622
        { "grow", GROW},
 
623
        { "incremental", INCREMENTAL},
 
624
        { "auto-detect", AUTODETECT},
589
625
};
590
626
 
591
627
mapping_t faultylayout[] = {