TOR: fix compilation
[tomato.git] / release / src / router / mdadm / TODO
blobf79163b88ca434065232034381af3a27aff23c25
1 2005-dec-20
2   Want an incremental assembly mode to work nicely with udev.
3   Core usage would be something like
4        mdadm --incr-assemble /dev/newdevice
5   This would
6      - examine the device to determine  uuid etc.
7      - look for a match in /etc/mdadm.conf, abort if not found
8      - find that device and collect current contents
9      - perform an 'assemble' analysis to make sure we have the best set of devices.
10      - remove or add devices as appropriate
11      - possibly start the array if it was complete
13    Other usages could involve
14      - specify which array to auto-add to.
15        This requires an existing array for uuid matching... is there any point?
17      -
20 2004-june-02
21   * Don't print 'errors' flag, it is meaningless. DONE
22   * Handle new superblock format
23   * create device file on demand, particularly partitionable devices. DONE
24       BUT figure a way to create the partition devices.
25               auto=partN
26   * Use Event: interface to listen for events. DONE, untested
27   * Make sure mdadm -As can assemble multi-level RAIDs ok.
28   * --build to build raid1 or multipath arrays 
29        clean or not ???
30   
31 ----------------------------------------------------------------------------
32 * mdadm --monitor to monitor failed multipath paths and re-instate them.
34 * Maybe make "--help" fit in 80x24 and have a --long-help with more info. DONE
37 * maybe "missing" instead of <bold>missing</> in doco DONE
38 * possibly wait for resync to start, or even finish while assembling.- NO
40 * -Db should have a devices= entry if possible. - DONE
41 * when assembling multipath arrays, ignore any error indicators. - DONE
42 * rationalise --monitor usage:
43      mdadm --monitor
44   doesn't do as expected. DONE
46 * --assemble could have a --update option. - DONE
47   following word can be:
48         sparc2.2
49         super-minor
51 * mdadm /dev/md11, where md11 is raid0 can segfault, particularly when looking in the 
52    [UU_UUU] string ... which doesn't exist !
53 It should be more sensible.  DONE
55 Example:
57 from  Raimund Sacherer <raimund.sacherer@ngit.at>
59 mke2fs -m0 -q /dev/ram1 300
60 mount -n -t ext2 /dev/ram1 /tmp
61 echo DEVICE /dev/[sh]* >> /tmp/mdadm.conf
62 mdadm -Esb /dev/[sh]* 2>/dev/null >> /tmp/mdadm.conf
63 mdadm -ARsc /tmp/mdadm.conf
64 umount /tmp
67 ?? Allow -S /dev/md? - current complains subsequent not a/d/r - DONE
69 * new "Query" mode to subsume --detail and --examine.
70    --query or -Q, takes a device and tells if it is an MD device,
71    and also tells in a raid superblock is found. 
72  DONE
74 * write mdstat.c to parse /proc/mdstat file
75    Build list of arrays:  name, rebuild-percent
76   DONE
78 * parse /proc/partitions and map major/minor into /dev/* names,
79   and use that for default DEVICE list ????
81 * --detail --scan to read /proc/mdstat, and then iterate over these,
82     but assume --brief.  --verbose can override
83     check each subdevice to see if it is in conf_get_devs.
84     Warn if not.
85   DONE, but don't warn yet...
87 * Support multipath ... maybe...
88   maybe DONE
90 * --follow to syslog 
92 * --follow to move spares around DONE
94 * --follow to notice other events: DONE
95      rebuild started
96      spare activated
97      spare removed
98      spare added
100 ------------------------------------
101 - --examine --scan scans all drives and build an mdadm.conf file DONE
103 - check superblock checksum in examine DONE
104 - report "chunk" or "rounding" depending on raid level DONE
105 - report "linear" instead of "-1" for raid level DONE
106 - decode ayout depending on raid level DONE
107 - --verbose and --force flags. DONE
109 - set md_minor, *_disks for Create  - DONE
110 - for create raid5, how to choose between 
111    all working, but not insync
112    one missing, one spare, insync  DONE (--force)
113 - and for raid1 - some failed drives...  (missing)
115 - when RUN_ARRAY, make sure *_disks counts are right
117 - get --detail to extract extra stuff from superblock,
118    like uuid  DONE
119 - --detail --brief to give a config file line DONE
120 - parse config file. DONE
121 - test...
123 - when --assemble --scan, if an underlying device is an md device, 
124   then try to assemble that device first.
127 - mdadm -S /dev/md0 /dev/md1 gives internal error FIXED
129 - mdadm --detail --scan print summary of what it can find? DONE
132 ---------
133 Assemble doesn't add spares. - DONE
134 Create to allow "missing" name for devices.
135 Create to accept "--force" for do exactly what is requested
136 - get Assemble to upgrade devices if force flag.
137 ARRAY lines in config file to have super_minor=n
138 ARRAY lines in config file to have device=pattern, and only accept
139    those devices
140    If UUID given, insist on that
141    If not, but super_minor given, require all found with that minor
142     to have same uuid
143    If only device given, all valid supers on those devices must have 
144     same uuid
145 allow /dev/mdX as first argument before any options
146 Possible --dry-run option for create and assemble--force
148 Assemble to check that all devices mentioned in superblock
149   are present.
151 New mode: --Monitor (or --Follow)
152   Periodically check status of all arrays (listed in config file).
153   Log every event and apparent cause - or differences
154   Email and alert - or run a program - for important events
155   Move spares around if necessary.
157   An Array line can have a spare-group= field that indicates that
158    the array shares spares with other arrays with the same
159    spare-group name.
160    If an array has a failed and no spares, then check all other
161      arrays in the spare group.  If one has no failures and a spare,
162      then consider that spare.
163     Choose the smallest considered spare that is large enough.
164     If there is one, then hot-remove it from it's home, and
165     hot-add it to the array in question.
167   --mail-to address  
168   --alert-handler program
169   
170   Will also extract information from /proc/mdstat if present,
171   and consider 20% marks in rebuild as events.
173   Events are:
174      drive fails  - causes mail to be sent
175      rebuild started
176      spare activated
177      spare removed
178      spare added