~xnox/ubuntu/quantal/mdadm/merge

« back to all changes in this revision

Viewing changes to ReadMe.c

  • Committer: Dmitrijs Ledkovs
  • Author(s): Clint Byrum
  • Date: 2011-12-16 11:06:12 UTC
  • mfrom: (1.1.26 sid)
  • Revision ID: dmitrijs.ledkovs@canonical.com-20111216110612-f91bfvyfvxc1t0rq
Tags: 3.2.2-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Call checks in local-premount to avoid race condition with udev
    and opening a degraded array.
  - d/initramfs/mdadm-functions: Record in /run when boot-degraded 
    question has been asked so that it is only asked once
  - pass --test to mdadm to enable result codes for degraded arrays. 
  - Build udeb with -O2 on ppc64, working around a link error.
  - 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/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 Ubuntu 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
  - d/p/debian-changes-3.1.4-1+8efb9d1ubuntu4: mdadm udev rule
    incrementally adds mdadm member when detected. Starting such an
    array in degraded mode is possible by mdadm -IRs. Using mdadm
    -ARs without stopping the array first does nothing when no
    mdarray-unassociated device is available. Using mdadm -IRs to
    start a previously partially assembled array through incremental
    mode. Keeping the mdadm -ARs for assembling arrays which were for
    some reason not assembled through incremental mode (i.e through
    mdadm's udev rule).
* Disabling -fno-strict-aliasing as according to debian bug 375876 it
  has been unnecessary since mdadm 2.5.2
* Dropped changes:
  - applied upstream
  - d/rules: fix FTBFS by adding -Wno-unused-but-set-variable to
    compiler flags until upstream solves the issue. (fixed upstream)
  - d/control: add dependency on initscripts >= 2.88dsf-13.3 to ensure
    /run exists per http://wiki.debian.org/ReleaseGoals/RunDirectory
    (change also done in debian)
* d/rules: add 'man' to build mdadm.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include "mdadm.h"
26
26
 
27
 
char Version[] = Name " - v3.1.4 - 31st August 2010\n";
 
27
char Version[] = Name " - v3.2.2 - 17th June 2011\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[]="-ABCDEFGIQhVXWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
 
89
char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
90
90
char short_bitmap_options[]=
91
 
                   "-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
 
91
                   "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
92
92
char short_bitmap_auto_options[]=
93
 
                   "-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:";
 
93
                   "-ABCDEFGIQhVXYWZ: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
 
    {"manage",    0, 0, '@'},
97
 
    {"misc",      0, 0, '#'},
 
96
    {"manage",    0, 0, ManageOpt},
 
97
    {"misc",      0, 0, MiscOpt},
98
98
    {"assemble",  0, 0, 'A'},
99
99
    {"build",     0, 0, 'B'},
100
100
    {"create",    0, 0, 'C'},
110
110
    {"detail-platform", 0, 0, DetailPlatform},
111
111
    {"kill-subarray", 1, 0, KillSubarray},
112
112
    {"update-subarray", 1, 0, UpdateSubarray},
 
113
    {"udev-rules", 2, 0, UdevRules},
113
114
 
114
115
    /* synonyms */
115
116
    {"monitor",   0, 0, 'F'},
116
117
 
117
118
    /* after those will normally come the name of the md device */
118
119
    {"help",      0, 0, 'h'},
119
 
    {"help-options",0,0,'h'},
 
120
    {"help-options",0,0, HelpOptions},
120
121
    {"version",   0, 0, 'V'},
121
122
    {"verbose",   0, 0, 'v'},
122
123
    {"quiet",     0, 0, 'q'},
123
124
 
124
125
    /* For create or build: */
125
 
    {"chunk",     1, 0, 'c'},
126
 
    {"rounding",  1, 0, 'c'}, /* for linear, chunk is really a rounding number */
 
126
    {"chunk",     1, 0, ChunkSize},
 
127
    {"rounding",  1, 0, ChunkSize}, /* for linear, chunk is really a
 
128
                                     * rounding number */
127
129
    {"level",     1, 0, 'l'}, /* 0,1,4,5,6,linear */
128
 
    {"parity",    1, 0, 'p'}, /* {left,right}-{a,}symmetric */
129
 
    {"layout",    1, 0, 'p'},
 
130
    {"parity",    1, 0, Layout}, /* {left,right}-{a,}symmetric */
 
131
    {"layout",    1, 0, Layout},
130
132
    {"raid-disks",1, 0, 'n'},
131
133
    {"raid-devices",1, 0, 'n'},
132
134
    {"spare-disks",1,0, 'x'},
133
135
    {"spare-devices",1,0, 'x'},
134
136
    {"size",      1, 0, 'z'},
135
 
    {"auto",      1, 0, 'a'}, /* also for --assemble */
 
137
    {"auto",      1, 0, Auto}, /* also for --assemble */
136
138
    {"assume-clean",0,0, AssumeClean },
137
139
    {"metadata",  1, 0, 'e'}, /* superblock format */
138
 
    {"bitmap",    1, 0, 'b'},
 
140
    {"bitmap",    1, 0, Bitmap},
139
141
    {"bitmap-chunk", 1, 0, BitmapChunk},
140
142
    {"write-behind", 2, 0, WriteBehind},
141
 
    {"write-mostly",0, 0, 'W'},
 
143
    {"write-mostly",0, 0, WriteMostly},
142
144
    {"re-add",    0, 0,  ReAdd},
143
145
    {"homehost",  1, 0,  HomeHost},
144
 
#if 0
145
 
    {"auto-update-homehost", 0, 0, AutoHomeHost},
146
 
#endif
147
146
    {"symlinks",  1, 0,  Symlinks},
148
147
 
149
148
    /* For assemble */
150
149
    {"uuid",      1, 0, 'u'},
151
 
    {"super-minor",1,0, 'm'},
 
150
    {"super-minor",1,0, SuperMinor},
152
151
    {"name",      1, 0, 'N'},
153
 
    {"config",    1, 0, 'c'},
 
152
    {"config",    1, 0, ConfigFile},
154
153
    {"scan",      0, 0, 's'},
155
 
    {"force",     0, 0, 'f'},
 
154
    {"force",     0, 0, Force},
156
155
    {"update",    1, 0, 'U'},
157
156
 
158
157
    /* Management */
159
 
    {"add",       0, 0, 'a'},
160
 
    {"remove",    0, 0, 'r'},
161
 
    {"fail",      0, 0, 'f'},
162
 
    {"set-faulty",0, 0, 'f'},
 
158
    {"add",       0, 0, Add},
 
159
    {"remove",    0, 0, Remove},
 
160
    {"fail",      0, 0, Fail},
 
161
    {"set-faulty",0, 0, Fail},
163
162
    {"run",       0, 0, 'R'},
164
163
    {"stop",      0, 0, 'S'},
165
164
    {"readonly",  0, 0, 'o'},
166
165
    {"readwrite", 0, 0, 'w'},
167
166
    {"no-degraded",0,0,  NoDegraded },
168
 
    {"wait",      0, 0, 'W'},
 
167
    {"wait",      0, 0,  WaitOpt},
169
168
    {"wait-clean", 0, 0, Waitclean },
170
169
 
171
170
    /* For Detail/Examine */
172
 
    {"brief",     0, 0, 'b'},
 
171
    {"brief",     0, 0, Brief},
173
172
    {"export",    0, 0, 'Y'},
174
173
    {"sparc2.2",  0, 0, Sparc22},
175
174
    {"test",      0, 0, 't'},
176
175
 
177
176
    /* For Follow/monitor */
178
 
    {"mail",      1, 0, 'm'},
179
 
    {"program",   1, 0, 'p'},
180
 
    {"alert",     1, 0, 'p'},
181
 
    {"increment", 1, 0, 'r'},
 
177
    {"mail",      1, 0, EMail},
 
178
    {"program",   1, 0, ProgramOpt},
 
179
    {"alert",     1, 0, ProgramOpt},
 
180
    {"increment", 1, 0, Increment},
182
181
    {"delay",     1, 0, 'd'},
183
 
    {"daemonise", 0, 0, 'f'},
184
 
    {"daemonize", 0, 0, 'f'},
 
182
    {"daemonise", 0, 0, Fork},
 
183
    {"daemonize", 0, 0, Fork},
185
184
    {"oneshot",   0, 0, '1'},
186
185
    {"pid-file",  1, 0, 'i'},
187
186
    {"syslog",    0, 0, 'y'},
 
187
    {"no-sharing", 0, 0, NoSharing},
 
188
 
188
189
    /* For Grow */
189
190
    {"backup-file", 1,0, BackupFile},
 
191
    {"invalid-backup",0,0,InvalidBackup},
190
192
    {"array-size", 1, 0, 'Z'},
191
193
 
192
194
    /* For Incremental */
193
 
    {"rebuild-map", 0, 0, 'r'},
 
195
    {"rebuild-map", 0, 0, RebuildMapOpt},
 
196
    {"path", 1, 0, IncrementalPath},
 
197
 
194
198
    {0, 0, 0, 0}
195
199
};
196
200
 
499
503
"  --mail=       -m   : Address to mail alerts of failure to\n"
500
504
"  --program=    -p   : Program to run when an event is detected\n"
501
505
"  --alert=           : same as --program\n"
 
506
"  --syslog      -y   : Report alerts via syslog\n"
502
507
"  --increment=  -r   : Report RebuildNN events in the given increment. default=20\n"
503
508
"  --delay=      -d   : seconds of delay between polling state. default=60\n"
504
509
"  --config=     -c   : specify a different config file\n"
593
598
"\n"
594
599
;
595
600
 
596
 
 
597
 
/* name/number mappings */
598
 
 
599
 
mapping_t r5layout[] = {
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
 
 
643
 
        { NULL, 0}
644
 
};
645
 
 
646
 
mapping_t pers[] = {
647
 
        { "linear", LEVEL_LINEAR},
648
 
        { "raid0", 0},
649
 
        { "0", 0},
650
 
        { "stripe", 0},
651
 
        { "raid1", 1},
652
 
        { "1", 1},
653
 
        { "mirror", 1},
654
 
        { "raid4", 4},
655
 
        { "4", 4},
656
 
        { "raid5", 5},
657
 
        { "5", 5},
658
 
        { "multipath", LEVEL_MULTIPATH},
659
 
        { "mp", LEVEL_MULTIPATH},
660
 
        { "raid6", 6},
661
 
        { "6", 6},
662
 
        { "raid10", 10},
663
 
        { "10", 10},
664
 
        { "faulty", LEVEL_FAULTY},
665
 
        { "container", LEVEL_CONTAINER},
666
 
        { NULL, 0}
667
 
};
668
 
 
669
 
 
670
 
mapping_t modes[] = {
671
 
        { "assemble", ASSEMBLE},
672
 
        { "build", BUILD},
673
 
        { "create", CREATE},
674
 
        { "manage", MANAGE},
675
 
        { "misc", MISC},
676
 
        { "monitor", MONITOR},
677
 
        { "grow", GROW},
678
 
        { "incremental", INCREMENTAL},
679
 
        { "auto-detect", AUTODETECT},
680
 
};
681
 
 
682
 
mapping_t faultylayout[] = {
683
 
        { "write-transient", WriteTransient },
684
 
        { "wt", WriteTransient },
685
 
        { "read-transient", ReadTransient },
686
 
        { "rt", ReadTransient },
687
 
        { "write-persistent", WritePersistent },
688
 
        { "wp", WritePersistent },
689
 
        { "read-persistent", ReadPersistent },
690
 
        { "rp", ReadPersistent },
691
 
        { "write-all", WriteAll },
692
 
        { "wa", WriteAll },
693
 
        { "read-fixable", ReadFixable },
694
 
        { "rf", ReadFixable },
695
 
 
696
 
        { "clear", ClearErrors},
697
 
        { "flush", ClearFaults},
698
 
        { "none", ClearErrors},
699
 
        { "default", ClearErrors},
700
 
        { NULL, 0}
701
 
};