Lines 285-295
Link Here
|
285 |
fi |
285 |
fi |
286 |
|
286 |
|
287 |
# Add raid devices |
287 |
# Add raid devices |
288 |
if [ -z "$EVMS_ACTIVE" ] && [ -f /proc/mdstat -a -s /etc/raidtab ] && ! grep -iwqs noraidtab /proc/cmdline; then |
|
|
289 |
echo -n "Starting up RAID devices: " |
290 |
|
288 |
|
291 |
rc=0 |
289 |
raid_helpers_found() { |
292 |
|
290 |
[ -s /etc/mdadm.conf ] && return 0 |
|
|
291 |
[ -s /etc/raidtab ] && return 0 |
292 |
return 1 |
293 |
} |
294 |
|
295 |
mount_raid_using_mdadm() { |
296 |
[ -s /etc/mdadm.conf ] || return 1 |
297 |
[ -x /sbin/mdadm ] || return 1 |
298 |
/sbin/mdadm --assemble --scan |
299 |
} |
300 |
|
301 |
mount_raid_using_raidtools() { |
302 |
local rc=0 |
303 |
[ -s /etc/raidtab ] || return 1 |
293 |
for i in `grep -s "^raiddev" /etc/raidtab | awk '{print $2}'`; do |
304 |
for i in `grep -s "^raiddev" /etc/raidtab | awk '{print $2}'`; do |
294 |
RAIDDEV="${i##*/}" |
305 |
RAIDDEV="${i##*/}" |
295 |
RAIDSTAT=`grep -s "^$RAIDDEV : active" /proc/mdstat` |
306 |
RAIDSTAT=`grep -s "^$RAIDDEV : active" /proc/mdstat` |
Lines 315-320
Link Here
|
315 |
fi |
326 |
fi |
316 |
echo -n "$RAIDDEV " |
327 |
echo -n "$RAIDDEV " |
317 |
done |
328 |
done |
|
|
329 |
return $rc |
330 |
} |
331 |
|
332 |
if [ -z "$EVMS_ACTIVE" ] && [ -f /proc/mdstat ] && raid_helpers_found && ! grep -iwqs noraidtab /proc/cmdline; then |
333 |
|
334 |
echo -n "Starting up RAID devices: " |
335 |
rc=0 |
336 |
mount_raid_using_mdadm || mount_raid_using_raidtools || rc=1 |
318 |
echo |
337 |
echo |
319 |
|
338 |
|
320 |
# A non-zero return means there were problems. |
339 |
# A non-zero return means there were problems. |