1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
* --assemble could have a --update option.
following word can be:
sparc2.2
super-minor
* mdadm /dev/md11, where md11 is raid0 can segfault, particularly when looking in the
[UU_UUU] string ... which doesn't exist !
It should be more sensible. DONE
Example:
from Raimund Sacherer <raimund.sacherer@ngit.at>
mke2fs -m0 -q /dev/ram1 300
mount -n -t ext2 /dev/ram1 /tmp
echo DEVICE /dev/[sh]* >> /tmp/mdadm.conf
mdadm -Esb /dev/[sh]* 2>/dev/null >> /tmp/mdadm.conf
mdadm -ARsc /tmp/mdadm.conf
umount /tmp
?? Allow -S /dev/md? - current complains subsequent not a/d/r - DONE
* new "Query" mode to subsume --detail and --examine.
--query or -Q, takes a device and tells if it is an MD device,
and also tells in a raid superblock is found.
DONE
* write mdstat.c to parse /proc/mdstat file
Build list of arrays: name, rebuild-percent
DONE
* parse /proc/partitions and map major/minor into /dev/* names,
and use that for default DEVICE list ????
* --detail --scan to read /proc/mdstat, and then iterate over these,
but assume --brief. --verbose can override
check each subdevice to see if it is in conf_get_devs.
Warn if not.
DONE, but don't warn yet...
* Support multipath ... maybe...
maybe DONE
* --follow to syslog
* --follow to move spares around DONE
* --follow to notice other events: DONE
rebuild started
spare activated
spare removed
spare added
------------------------------------
- --examine --scan scans all drives and build an mdadm.conf file DONE
- check superblock checksum in examine DONE
- report "chunk" or "rounding" depending on raid level DONE
- report "linear" instead of "-1" for raid level DONE
- decode ayout depending on raid level DONE
- --verbose and --force flags. DONE
- set md_minor, *_disks for Create - DONE
- for create raid5, how to choose between
all working, but not insync
one missing, one spare, insync DONE (--force)
- and for raid1 - some failed drives... (missing)
- when RUN_ARRAY, make sure *_disks counts are right
- get --detail to extract extra stuff from superblock,
like uuid DONE
- --detail --brief to give a config file line DONE
- parse config file. DONE
- test...
- when --assemble --scan, if an underlying device is an md device,
then try to assemble that device first.
- mdadm -S /dev/md0 /dev/md1 gives internal error FIXED
- mdadm --detail --scan print summary of what it can find?
---------
Assemble doesn't add spares. - DONE
Create to allow "missing" name for devices.
Create to accept "--force" for do exactly what is requested
- get Assemble to upgrade devices if force flag.
ARRAY lines in config file to have super_minor=n
ARRAY lines in config file to have device=pattern, and only accept
those devices
If UUID given, insist on that
If not, but super_minor given, require all found with that minor
to have same uuid
If only device given, all valid supers on those devices must have
same uuid
allow /dev/mdX as first argument before any options
Possible --dry-run option for create and assemble--force
Assemble to check that all devices mentioned in superblock
are present.
New mode: --Monitor (or --Follow)
Periodically check status of all arrays (listed in config file).
Log every event and apparent cause - or differences
Email and alert - or run a program - for important events
Move spares around if necessary.
An Array line can have a spare-group= field that indicates that
the array shares spares with other arrays with the same
spare-group name.
If an array has a failed and no spares, then check all other
arrays in the spare group. If one has no failures and a spare,
then consider that spare.
Choose the smallest considered spare that is large enough.
If there is one, then hot-remove it from it's home, and
hot-add it to the array in question.
--mail-to address
--alert-handler program
Will also extract information from /proc/mdstat if present,
and consider 20% marks in rebuild as events.
Events are:
drive fails - causes mail to be sent
rebuild started
spare activated
spare removed
spare added
|