~ubuntu-branches/ubuntu/karmic/mdadm/karmic

« back to all changes in this revision

Viewing changes to mdadm.c

  • Committer: Package Import Robot
  • Author(s): Scott James Remnant
  • Date: 2007-12-12 22:35:09 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20071212223509-10l2hitpp068jr53
Tags: 2.6.3+200709292116+4450e59-3ubuntu1
* Merge from debian unstable, remaining changes:
 * 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:
180
180
                switch(opt) {
181
181
                case '@': /* just incase they say --manage */
182
182
                        newmode = MANAGE;
183
 
                        shortopt = short_bitmap_auto_options;
 
183
                        shortopt = short_bitmap_options;
184
184
                        break;
185
185
                case 'a':
186
186
                case 'r':
188
188
                case ReAdd: /* re-add */
189
189
                        if (!mode) {
190
190
                                newmode = MANAGE;
191
 
                                shortopt = short_bitmap_auto_options;
 
191
                                shortopt = short_bitmap_options;
192
192
                        }
193
193
                        break;
194
194
 
196
196
                case 'B': newmode = BUILD; shortopt = short_bitmap_auto_options; break;
197
197
                case 'C': newmode = CREATE; shortopt = short_bitmap_auto_options; break;
198
198
                case 'F': newmode = MONITOR;break;
199
 
                case 'G': newmode = GROW; shortopt = short_bitmap_auto_options; break;
 
199
                case 'G': newmode = GROW;
 
200
                        shortopt = short_bitmap_options;
 
201
                        break;
200
202
                case 'I': newmode = INCREMENTAL; break;
201
203
                case AutoDetect:
202
204
                        newmode = AUTODETECT; break;
815
817
                        backup_file = optarg;
816
818
                        continue;
817
819
 
818
 
                case O(GROW,'b'):
819
820
                case O(BUILD,'b'):
820
821
                case O(CREATE,'b'): /* here we create the bitmap */
 
822
                        if (strcmp(optarg, "none") == 0) {
 
823
                                fprintf(stderr, Name ": '--bitmap none' only"
 
824
                                        " support for --grow\n");
 
825
                                exit(2);
 
826
                        }
 
827
                        /* FALL THROUGH */
 
828
                case O(GROW,'b'):
821
829
                        if (strcmp(optarg, "internal")== 0 ||
822
830
                            strcmp(optarg, "none")== 0 ||
823
831
                            strchr(optarg, '/') != NULL) {
842
850
                        bitmap_chunk = bitmap_chunk ? bitmap_chunk * 1024 : 512;
843
851
                        continue;
844
852
 
 
853
                case O(GROW, WriteBehind):
845
854
                case O(BUILD, WriteBehind):
846
855
                case O(CREATE, WriteBehind): /* write-behind mode */
847
856
                        write_behind = DEFAULT_MAX_WRITE_BEHIND;