1 - add 'name' field to metadata type and use it.
2 - use validate_geometry more
3 - metadata should be able to check/reject bitmap stuff.
6 Three new metadata types:
7 ddf - used only to create a container.
8 ddf-bvd - used to create an array in a container
9 ddf-svd - used to create a secondary array from bvds.
12 mdadm -C /dev/ddf1 /dev/sd[abcdef]
13 mdadm -C /dev/md1 -e ddf /dev/sd[a-f]
14 mdadm -C /dev/md1 -l container /dev/sd[a-f]
16 Each of these create a new ddf container using all those
17 devices. The name 'ddf*' signals that ddf metadata should be used.
18 '-e ddf' only supports one level - 'container'. 'container' is only
21 mdadm -C /dev/md1 -l0 -n4 /dev/ddf1 # or maybe not ???
22 mdadm -C /dev/md1 -l1 -n2 /dev/sda /dev/sdb
23 If exactly one device is given, and it is a container, we select
24 devices from that container.
25 If devices are given that are already in use, they must be in use by
26 a container, and the array is created in the container.
27 If devices given are bvds, we slip under the hood to make
30 mdadm -A /dev/ddf ......
31 base drives make a container. Anything in that container is started
33 if /dev/ddf is already assembled, we assemble bvds and svds inside it.
37 Want an incremental assembly mode to work nicely with udev.
38 Core usage would be something like
39 mdadm --incr-assemble /dev/newdevice
41 - examine the device to determine uuid etc.
42 - look for a match in /etc/mdadm.conf, abort if not found
43 - find that device and collect current contents
44 - perform an 'assemble' analysis to make sure we have the best set of devices.
45 - remove or add devices as appropriate
46 - possibly start the array if it was complete
48 Other usages could involve
49 - specify which array to auto-add to.
50 This requires an existing array for uuid matching... is there any point?
56 * Don't print 'errors' flag, it is meaningless. DONE
57 * Handle new superblock format
58 * create device file on demand, particularly partitionable devices. DONE
59 BUT figure a way to create the partition devices.
61 * Use Event: interface to listen for events. DONE, untested
62 * Make sure mdadm -As can assemble multi-level RAIDs ok.
63 * --build to build raid1 or multipath arrays
66 ----------------------------------------------------------------------------
67 * mdadm --monitor to monitor failed multipath paths and re-instate them.
69 * Maybe make "--help" fit in 80x24 and have a --long-help with more info. DONE
72 * maybe "missing" instead of <bold>missing</> in doco DONE
73 * possibly wait for resync to start, or even finish while assembling.- NO
75 * -Db should have a devices= entry if possible. - DONE
76 * when assembling multipath arrays, ignore any error indicators. - DONE
77 * rationalise --monitor usage:
79 doesn't do as expected. DONE
81 * --assemble could have a --update option. - DONE
82 following word can be:
86 * mdadm /dev/md11, where md11 is raid0 can segfault, particularly when looking in the
87 [UU_UUU] string ... which doesn't exist !
88 It should be more sensible. DONE
92 from Raimund Sacherer <raimund.sacherer@ngit.at>
94 mke2fs -m0 -q /dev/ram1 300
95 mount -n -t ext2 /dev/ram1 /tmp
96 echo DEVICE /dev/[sh]* >> /tmp/mdadm.conf
97 mdadm -Esb /dev/[sh]* 2>/dev/null >> /tmp/mdadm.conf
98 mdadm -ARsc /tmp/mdadm.conf
102 ?? Allow -S /dev/md? - current complains subsequent not a/d/r - DONE
104 * new "Query" mode to subsume --detail and --examine.
105 --query or -Q, takes a device and tells if it is an MD device,
106 and also tells in a raid superblock is found.
109 * write mdstat.c to parse /proc/mdstat file
110 Build list of arrays: name, rebuild-percent
113 * parse /proc/partitions and map major/minor into /dev/* names,
114 and use that for default DEVICE list ????
116 * --detail --scan to read /proc/mdstat, and then iterate over these,
117 but assume --brief. --verbose can override
118 check each subdevice to see if it is in conf_get_devs.
120 DONE, but don't warn yet...
122 * Support multipath ... maybe...
127 * --follow to move spares around DONE
129 * --follow to notice other events: DONE
135 ------------------------------------
136 - --examine --scan scans all drives and build an mdadm.conf file DONE
138 - check superblock checksum in examine DONE
139 - report "chunk" or "rounding" depending on raid level DONE
140 - report "linear" instead of "-1" for raid level DONE
141 - decode ayout depending on raid level DONE
142 - --verbose and --force flags. DONE
144 - set md_minor, *_disks for Create - DONE
145 - for create raid5, how to choose between
146 all working, but not insync
147 one missing, one spare, insync DONE (--force)
148 - and for raid1 - some failed drives... (missing)
150 - when RUN_ARRAY, make sure *_disks counts are right
152 - get --detail to extract extra stuff from superblock,
154 - --detail --brief to give a config file line DONE
155 - parse config file. DONE
158 - when --assemble --scan, if an underlying device is an md device,
159 then try to assemble that device first.
162 - mdadm -S /dev/md0 /dev/md1 gives internal error FIXED
164 - mdadm --detail --scan print summary of what it can find? DONE
168 Assemble doesn't add spares. - DONE
169 Create to allow "missing" name for devices.
170 Create to accept "--force" for do exactly what is requested
171 - get Assemble to upgrade devices if force flag.
172 ARRAY lines in config file to have super_minor=n
173 ARRAY lines in config file to have device=pattern, and only accept
175 If UUID given, insist on that
176 If not, but super_minor given, require all found with that minor
178 If only device given, all valid supers on those devices must have
180 allow /dev/mdX as first argument before any options
181 Possible --dry-run option for create and assemble--force
183 Assemble to check that all devices mentioned in superblock
186 New mode: --Monitor (or --Follow)
187 Periodically check status of all arrays (listed in config file).
188 Log every event and apparent cause - or differences
189 Email and alert - or run a program - for important events
190 Move spares around if necessary.
192 An Array line can have a spare-group= field that indicates that
193 the array shares spares with other arrays with the same
195 If an array has a failed and no spares, then check all other
196 arrays in the spare group. If one has no failures and a spare,
197 then consider that spare.
198 Choose the smallest considered spare that is large enough.
199 If there is one, then hot-remove it from it's home, and
200 hot-add it to the array in question.
203 --alert-handler program
205 Will also extract information from /proc/mdstat if present,
206 and consider 20% marks in rebuild as events.
209 drive fails - causes mail to be sent