Fix parsing of /dev/md/N in is_standard
[thirdparty/mdadm.git] / ChangeLog
CommitLineData
0bbc98b5
NB
1Changes Prior to this release
2 - Don't use 'lstat' to check for blockdevices, use stat.
779043ef 3 - Document --size=max option for --grow
b8f72a62 4 - Document SparesMissing event and DeviceDisappeared/WrongLevel
91f068bf
NB
5 - --stop --scan repeatly cycles until no more progress can be made
6 so that stack devices are stopped properly
3fa06e9d 7 - Minor type rationalisation for ident->uuid - now always 'int[]'
891d2994 8 - Fix type in online help for --grow (was -F, now -G)
1337546d
NB
9 - Allow --auto command line option to set default auto=
10 value when running "--assemble --scan". Previously
11 --auto was ignored if --scan was given
a46f4061 12 - Fix a few type casts
5a6d1148 13 - Fix parsing of /dev/md/N in is_standard
0bbc98b5 14
e5811618 15Changes Prior to 1.11.0 release
0fbf459d
NB
16 - Fix embarassing bug which causes --add to always fail.
17
d7eaf49f
NB
18Changes Prior to 1.10.0 release
19 - Fix bug with --config=partitions
20 - Open sub-devices with O_EXCL to detect if already in use
b2b46bfc
NB
21 - Make sure superblock updates are flushed directly to disk.
22
e793c2e5
NB
23Changes Prior to 2.0-deve-1 release
24 - Support for version-1 superblock. See --metadata option.
25 - Support for bitmap based intent logging.
26 - Minor fixes.
27
9a4e08d2
NB
28Changes Prior to 1.9.0 release
29 - Fix rpm build problem (stray %)
19f8b8fc 30 - Minor manpage updates
182661f4 31 - Change "dirty" status to "active" as it was confusing people.
8d80900b
NB
32 - --assemble --auto recognises 'standard' name and insists on using
33 the appropriate major/minor number for them.
34 - Remove underscore from partition names, so partitions of
35 "foo" are "foo1", "foo2" etc (unchanged) and partitions of
36 "f00" are "f00p1", "f00p2" etc rather than "f00_p1"...
0df46c2a
NB
37 - Use "major", "minor", "makedev" macros instead of
38 "MAJOR", "MINOR", "MKDEV" so that large device numbers work
39 on 2.6 (providing you have glibc 2.3.3 or later).
43fc1676 40 - Add some missing closes of open file descriptors.
057bd352
NB
41 - Reread /proc/partition for every array assembled when using
42 it to find devices, rather than only once.
d17c1f8c
NB
43 - Make "mdadm -Ss" stop stacked devices properly, by reversing the
44 order in which arrays are stopped.
e6b64cd0 45 - Improve some error messages.
0320ea45
NB
46 - Allow device name to appear before first option, so e.g.
47 mdadm /dev/md0 -A /dev/sd[ab]
48 works.
49 - Assume '-Q' if just a device is given, rather than being silent.
a3fd117c
NB
50 - Change "dirty" status to "active" as it was confusing people.
51
b5e64645
NB
52Changes Prior to 1.8.0 release
53 - Makefile cleanup from Luca Berra <bluca@comedia.it>
54 - --pid-file (-i) to set a pid file to use with --monitor --daemonise
55 - Fix typo in mdadm man page
56 - Fix coredump when "-s" used with no config file present.
57 - Support new "faulty" personality which can inject synthetic
58 faults. (Not in kernel.org yet at 1Nov2004)
59 - Support raid0/linear on devices > 2 Terabytes
60 - Make sure raid6 resyncs when created with one missing device
61
62Changes Prior to 1.7.0 release
e5329c37
NB
63 - Support "--grow --add" to add a device to a linear array, if the
64 kernel supports it. Not documented yet.
65 - Restore support for uclibc which was broken recently.
66 - Several improvements to the output of --detail, including
67 reporting "resyncing" or "recovering" in the state.
68 - Close filedescriptor at end of --detail (exit would have closed it
69 anyway, so this isn't abig deal).
70 - Report "Sync checkpoint" in --examine output if appropriate.
71 - Add --update=resync for --assemble mode to for a resync when the
72 array is assembled.
73 - Add support for "raid10", which is under development in 2.6.
74 Not documented yet.
75 - --monitor now reads spare-group and spares info from config file
76 even when names of arrays to scan are given on the command line
77
dd0781e5
NB
78Changes Prior to 1.6.0 release
79 - Device name given in -Eb is determined by examining /dev rather
80 than assuming /dev/md%d
81 - Fix bug in --monitor where an array could be held open an so
82 could not be stopped without killing mdadm.
83 - Add --grow mode. Currently only --size and --raid-disks can be
84 changed. Both require kernel support which, at the time of
85 writing, is not in a release kernel yet.
86 - Don't print out "errors" or "no-errors" in -D and -E, as the bit
87 is never set or used.
88 - Use md event notification in 2.6.??? to make --monitor mode
89 respond instantly to events.
90 - Add --auto= option and auto= configfile entry to tell mdadm to
91 create device files as needed. This is particularly useful
92 with partitioned arrays where the major device number can change.
93 - When generating --brief listing, if the standard name doesn't
94 exist, search /dev for one rather than using a temp name.
95 - Allow --build to build raid1 and multipath arrays.
96 - Add "--assume-clean" for Create and Build, particularly for raid1
97 Note: this is dangerous. Only use it if you are certain.
98 - Fix bug so that Rebuild status monitoring works again.
99 - Add "degraded" and "recovering" options to the "Status:"
100 entry for --detail
101
102Changes Prior to 1.5.0 release
98c6faba
NB
103 - new commands "mdassemble" which is a stripped-down equivalent of
104 "mdadm -As", that can be compiled with dietlibc.
105 Thanks to Luca Berra <bluca@comedia.it>.
106 It can be using in an initramfs or initrd.
107 - Fix compiling error with BLKGETSIZE64 and some signed/unsigned
108 comparison warnings.
109 - Add Rebuild Status (% complete) to --detail output.
110 - Support "--monitor --test" which will generate a test alert
111 for each array once, to test notification paths.
112 - Generate RebuildFinished event when rebuild finishes.
113 - Support for raid6 as found in 2.6.2 - thanks to
114 H. Peter Anvin <hpa@zytor.com>
115 - Support partitioned md arrays with a different major number and
116 naming scheme (md_dX in /proc/mdstat, /dev/md/dXpY in /dev).
117
feb716e9
NB
118Changes Prior to 1.4.0 release
119 - Document fact that creating a raid5 array really creates a
120 degraded array with a spare.
121 - Add "spares=" tag to config file and generate it wit --detail and
122 --examine
123 - Add "SparesMissing" event when --monitor first sees an array and
124 it doesn't have the enough spare devices.
125 - Add --update=summaries for --assemble to update summary
126 information in superblock, and correct other inconsistancies in
127 the superblock.
128 - Add --test option to --detail to set a meaningful exit status.
129
aa88f531
NB
130Changes Prior to 1.3.0 release
131 - Make 'size' and unsigned long in Create to allow creation of
132 larger arrays.
133 - Explicitly flag spare devices as 'spare' in --detail and --examine
134 output. Previously they simply had no flags lists.
135 - Make MailCmd (for monitor) configurable in Makefile, and default
136 to "/usr/sbin/sendmail -t". Also split out the warning related
137 flags into CWFLAGS for easier build configurability.
138 - Minor bugfix in Manage code.
139 - --monitor now notices and reports degraded arrays at startup using
140 "DegradedArray" event, and also has a --oneshot option to only
141 report DegradedArrays, and then exit.
142 - Small man-page clarification w.r.t. raid levels and raid4 in
143 particular.
144 - Disallow creation of arrays with only one device as this is
145 probably a mistake. --force will override this check.
146 - Correct some misleading documentation in the "mdadm --create --help"
147 message.
148 - Ignore chunksize if raid1 or multipath.
149 - Explicit statement in man page that raid-disks cannot be changed
150 after array is created.
151 - Improve message when attempting to start an array with
152 insufficient devices. Instead of required the array to be full,
153 we only require it has as many active devices as last time.
154
56eedc1a
NB
155Changes Prior to 1.2.0 release
156 - Fix bug where --daemonise required an argument.
157 - In --assemble --verbose, print appropriate message if device is
158 not in devices= list
159 - Updated mdadm.conf.5 to reflect fact that device= takes wildcards
160 - Typos: componenet -> component
161 - Reduce size of "--help" message put excess into "--help-options"
162 - Fix bug introduced when MD_SB_DISKS dependancy removed, and which
163 caused spares not be assembled properly.
164 - Print appropriate message if --monitor --scan decides not to
165 monitor anything.
d013a55e
NB
166Changes Prior to 1.1.0 release
167 - add --deamonise flag for --monitor - forks and prints pid to stdout
168 - Fix bug so we REALLY clear dirty flag with -Af
169 - -Db now prints a 'devices=' word for each array.
170 - "mdadm -A /dev/md0" will get info from configfile, even without scan
171 - When assembling multipath arrays, ignore devices which are flagged
172 as having errors.
173 - take --super-minor=dev to mean "use the minor number of the mddev
174 being assembled.
175 - take --config=none to mean "completely ignore config file"
176 - Make --monitor require --scan or a device list.
5787fa49
NB
177Changes Prior to 1.0.9 release
178 - Documentation updates including kernel parameters documented
179 in md.4
180 - --assemble --force for raid4/5 will mark clean, needed for 2.5
181 - --detail prints out the events counter as well
182 - flush device before reading superblock to be sure to get
183 current data
184 - added mdadm.static target to makefile for static linking
185 - --monitor was ignoring /dev/md0 due to off-by-one error
186 - Fix assorted typos
187 - Fix printing of Gibibytes - calc was wrong.
188 - Fix printing of Array Size in --detail when very big.
189 - --monitor no longer tries to work for raid0 or linear as these
d013a55e 190 have nothing to be monitored.
5787fa49
NB
191 - The word 'partitions' on a DEVICE line will cause all partitions
192 listed in /proc/partitions to be considered
193 - If the config file is called 'partitions' then it will be treated
194 as though it contained exactly 'device partitions' so e.g.
195 mdadm -Ebsc partitions
d013a55e 196 will find all raid partitions easily.
5787fa49
NB
197 - successfully assemble multipath devices by ignoring raid_disk
198 value from superblock (it is always the same).
199 - --assemble not tied to MD_SB_DISKS limit quite so much
200 - Support compiling with tcc
201 - Support compiling with uclibc - just skip scan of /dev
202 - Add --update= option for Assemble mode. Either sparc2.2
203 or super-minor updates are possible. See mdadm.8
204
205Changes Prior to 1.0.1 release
bd526cee
NB
206 - Round off MB/GiB etc values instead of round down.
207 - Add --sparc2.2 option to examine to shift superblock around
208 and --sparc2.2update to rewrite the superblock
5787fa49 209 - Fix assorted typos in online help
bd526cee
NB
210
211Changes Prior to 1.0.0 release
2d465520
NB
212 - Allow --config with Misc mode (for --examine --scan)
213 - Add $(CXFLAGS) to end of CFLAGS in makefile
214 - When making an N disk raid5 array, the Nth drive
215 is moved to the end of the array as a spare rather than
216 being shifted up one place. This means that when the
217 kernel builds onto the last spare and inserts it,
218 the devices will be in the expected order.
219 - Man page improvements
220Changes Prior to 0.8.2 release
b83d95f3
NB
221 - Correct spelling of persist[ae]nce/persist[ae]nt.
222 - Change "disk" to "device" in options and config file
223 - convert array size to "long long" *before* shift-left in -D and -Q
224
225Changes Prior to 0.8.1 release
c913b90e
NB
226 - Add "INSTALL" file.
227 - Fix some "i" variables that were not being set properly
228 - Initialise minsize and maxsize so that compilers don't complain.
229 - Tidy up Makefile and mdadm.spec installations
230 - Add "multipath" to documentation of valid levels
231
232Changes Prior to 0.8 release
e0d19036
NB
233 - Fix another bug in Assemble.c due to confusing 'i' with 'j'
234 - Minimal, untested, support for multipath
235 - re-write of argument parsing to have more coherent modes,
236 - add --query,-Q option
237 - Update mdadm.8 to reflect arg processing change and --query
238 - Change "long" to "unsigned long" for device sizes
239 - Handle "mailaddr" and "program" lines in config file for follow/scan mode.
240 - --follow --scan will exit if no program or mail found
241 - Add MAILADDR and PROGRAM to mdadm.conf-example
242 - Spell check man pages
243 - consistently use "component devices" instead of "subdevices"
244 - Make -Wall -Werror really work and fix lots of errors.
245 - --detail and --stop can have --scan which chooses devices from /proc/mdstat
246 - --monitor detects 20% changes in resync, failed spares,
247 disappearing arrays,
248 - --monitor --scan will automatically add any devices found in /proc/mdstat
249 - --monitor will move spares between arrays with same spare-group if necessary
250 - Documentation for Monitor Mode
251 - --query notes if the array containing the given device is active or not
252 - Finished md.4 man page.
253
254Changes Prior to 0.7.2 release
11a3e71d
NB
255 - mdadm.spec updates and ifdef BLKGETSIZE64 from Luca Berra -- bluca@comedia.it
256 - more mdadm.spec updates from Gregory Leblanc <gleblanc@linuxweasel.com>
257 - make directory for mdadm.conf configurable in Makefile
258 - Finished mdadm.conf.5. Removed details of conf file from
259 mdadm.8 leaving a reference to mdadm.conf.5.
260 - Fix bug in Assemble.c, thanks to Junaid Rizvi <domdev@sat.net.pk>
261 - Get --assemble --force to make sure old major/minor numbers are
262 consistant, as md.c worries about this :-(
263
264
265Changes Prior to 0.7.1 release
56eb10c0
NB
266 - update mdadm.spec
267 - use BLKGETSIZE64 if available for array size
268 - give human readable as GiB/MiB and GB and MB, with 2 decimal point precision
269 - Only warn about size variation for raid1/4/5.
270 - Started md.4 man page
271 - Started mdadm.conf.5 man page
272
9a9dab36
NB
273Changes Prior to 0.7 release
274
275 - Fix makefile to install binary at /sbin and not /sbin/sbin
276 Also install man page.
277 - Add --zero-superblock based on --destroywithextremeprejudice
278 from Dale Stephenson <steph@snapserver.com>
279 - change name to mdadm. It is palandromic, and much nicer to pronouce.
280
cd29a5c8
NB
281Changes Prior to 0.6 release
282
9a9dab36 283 - Remove the limit on the number of device names that can be
cd29a5c8
NB
284 given on the command line.
285 - Fix bug in --assemble --force where it would only update a
286 single superblock.
287 - Fix bogus printing of big numbers not being block devices
288 when given names of devices that don't exist.
289 - When --assemble --force, consider superblocks with an event
290 count that is 1 behind as out-of-date. Normally they are
291 considered up-to-date (as the kernel assumes this too).
292 - When marking drives as not-failed in the superblock,
293 we also mark them as ACTIVE and SYNC.
294 - Don't start arrays for which not all drives are available unless:
295 --scan which implies that all drives were found automatically
296 --run which means the user knows what they want
297 --force which means that we are fixing something broken
298 - Make sure all device numbers passed as 3rd arg of ioctl
299 are passed as unsigned lock, so that it works on SPARC
300 - If HOT_ADD_DISK failes for -a, then only try ADD_NEW_DISK
301 if we cannot read from the array, i.e. if the array is
302 not started yet.
303 - man page update
304 - Taught Examine to handle --scan. It examines all devices listed
305 on DEVICE lines in the config file.
306 - Added --brief (-b) flag for Examine and Detail to print out
307 and mdctl.conf compatible description with uuid=, level=,
308 disks= and - for Examine - devices=
309 --examine --brief collects all devices the make the one array and
310 list them as one entry.
311 - Added level= and disks= options to ARRAY lines in config files
312 so --brief output could be used as-is.
313 - Make parity style ({left,right}-{,a}symmetric) consistantly use -,
314 never _.
315 - Add "Array Size" to --detail output
316 - Change "Size" to "Device Size" and exclude from Detail of arrays
317 that do not have a consistent device size.
318 - Add Human readable MiB or GiB value on size lines of Detail and Examine
319 - --assemble --scan doesn't complain about active drives
320 - require number of spares given in -x to be listed.
321 - Made --build actually work.
322Changes Prior to 0.5 release
323
324 --assemble:
325 spare drives are handled properly.
326
327 --force can be used to recover from 2-drive failures on RAID5
328 If you belive that /dev/hda1 /dev/hdb1 /dev/hdc1 /dev/hdd1 should
329 make a raid5 array, but it has experienced multiple failures and
330 wont start, then
331
332 mdctl --assemble --force /dev/md0 /dev/hd[abcd]1
333
334 Should update the superblock on the newest failed drive and
335 restart the array in degraded mode. You should then remove the
336 remaining failed drive and re-add it (if you are happy that it
337 might work).
338
339 Ofcourse whenever you have a 2-drive failure, you have a risk
340 of corruption in data that hasn't be changed for a long time. So
341 this doesn't give you your array back all nice and happy, but it
342 does allow you to recover data that might not be corrupt.
343
344 More flexibility in identifying a RAID array in the mdctl.conf
345 e.g.
346 array /dev/md4 super-minor=4
347
348 assembles /dev/md4 from all devices found that have a raid
349 superblock that says the minor number of the array is 4.
350 If the blocks with the right minor number do not all have the
351 same UUID, an error is flags and no assembly happens.
352
353 array /dev/md3 devices=/dev/hd[abc]2
354
355 Assembles /dev/md3 drom /dev/hda2 /dev/hdb2 and/dev/hdc2. All
356 devices must exist and have raid superblock with the same uuid.
357
358 If two identity specifiers are used, only devices that match all
359 of them are considered, so
360
361 array /dev/md2 devices=/dev/hd?2 super-minor=2
362
363 will assemble /dev/md2 using all /dev/hd?2 devices which have a
364 raid superblock with minor number 2.
365
366 --create:
367 When listing devices for --create, the word "missing" can be
368 used to indicate that the respective slot does not have a
369 working drive currently. This is similar to the "failed-disk"
370 directive in mkraid/raidtab.
371 e.g.
372 mdctl --create --level=5 -raid-disks=4 --spare-disks=2
373 /dev/md0 /dev/sda /dev/sdb missing /dev/sdc /dev/sdd /dev/sde
374
375 will create a raid5 array with the third slot empty, and two
376 spares.
377
378 By default, raid5 arrays are created with the last slot empty
379 and drive listed for the last slot added as a spare. If a
380 "missing" slot is given, or if --force is given, then --create
381 does exactly what you ask and doesn't try to be clever.
382
383
384 --follow / --monitor:
385
386 This is a new mode. I couldn't stop my self from picking a name
387 starting with F (as current modes start A,B,C,D,E) but I
388 relented and provided an alternate name that is somewhat more
389 meaningful.
390
391 In this mode, mdctl does not exit, but runs continuously and
392 periodically polls all the md devices to see if they have had
393 any interested state change.
394 The changes that it currently notices are:
395 Fail - an active disc fails
396 FailSpare - a spare, that was presumably being build, fails
397 ActiveSpare - a spare becomes active, presumably after a rebuild.
398
399 Options:
400 --mail mailaddress - send Email on any Fail* event
401 --program program - run the program on any event.
402 Args are: eventname mddevice subdevice(if-known)
403 --delay seconds - change from the default 60second pause
404 between polls.
405
406 I plan to add functionality to this mode to allow sharing of
407 spare drives. If an array is marks "spare-group=fred", and it
408 has a failed drive and no spares, and if some other array is
409 also "spare-group=fred" and it has no failed drives, but does
410 have a spare drive that is big enough, the spare will be moved
411 to the first array.
412
413 I also have the idea of adding a --grow mode which will re-organise
414 the data on an N disk raid0/4/5 array to be on an N+M disk array.
415 I have no concrete plans for this though.
416
417 I got rid of the "v" in the archive file name, and include the
418 version number in the directory created by the archive.
419
420 There is now a man page and mdctl.spec (for rpm) thanks to
421 Danilo Godec <danci@agenda.si>.
422
423 Ofcourse, the man page is now out of date and despite being based on
424 the --help output, is not wholy correct. After I get --follow
425 working properly, I plan to revise the various documentation and/or
426 the code to make sure the two match.