View previous topic :: View next topic |
Author |
Message |
c_kuzmanic Guru
Joined: 18 Apr 2002 Posts: 488 Location: Los Angeles , California
|
Posted: Wed Oct 02, 2002 11:01 am Post subject: Problems with /etc/init.d/checkfs - software raid |
|
|
Hi,
I just successfully upgraded to Gentoo 1.4_rc1. Thanks to the update scripts, everything went smooth:)
There's just one problem with /etc/init.d/checkfs, when it is run at boot-time to start my software raid arrays (RAID0) the above mentioned script returns the following error:
sbin/runscript.sh : error: binary operator expected : Failed to start software RAID
Heres a listing of the relevant section from /etc/init.d/checkfs :
# Start software raid
if [ -x /sbin/raidstart -a -f /etc/raidtab -a -f /proc/mdstat ]
then
ebegin "Starting software RAID"
ACTIVE_RAID="`grep -E "md[0-9]+[[:space:]]?: active raid" /proc/mdstat | awk -F ':' '{print "/dev/"$1}'`"
if [ -n ${ACTIVE_RAID} ]
then
for x in $(grep -E "raiddev /dev/md[0-9]+" /etc/raidtab | \
awk '{print $2}' | grep -v "`echo ${ACTIVE_RAID} | sed s'/[[:space:]]//g'`")
do
/sbin/raidstart ${x}
done
else
/sbin/raidstart --all
fi
eend $? "Failed to start software RAID"
fi
Even though checkfs returns the above mentioned error, my software raid array is still initialised properly, due to (?)
---else
/sbin/raidstart --all
---fi
However, somewhere in the script there's an error which will pass a wrong value to grep/awk and give the error message.
My skills with awk are nill, therefore it would be nice if somebody could have a look at this and point me to a solution.
Just in case, here's my /etc/raidtab :
raiddev /dev/md1
raid-level 0
nr-raid-disks 2
chunk-size 32
persistent-superblock 1
device /dev/hda3
raid-disk 0
device /dev/hdc3
raid-disk 1
raiddev /dev/md2
raid-level 0
nr-raid-disks 2
chunk-size 32
persistent-superblock 1
device /dev/hda4
raid-disk 0
device /dev/hdc4
raid-disk 1
and the output from cat /proc/mdstat :
Personalities : [raid0]
read_ahead 1024 sectors
md1 : active raid0 ide/host0/bus1/target0/lun0/part3[1] ide/host0/bus0/target0/lun0/part3[0]
81925632 blocks 32k chunks
md2 : active raid0 ide/host0/bus1/target0/lun0/part4[1] ide/host0/bus0/target0/lun0/part4[0]
72814016 blocks 32k chunks
unused devices: <none>
Any insights would be very much appreciated, probs with raid always make me nervous...
[/b] |
|
Back to top |
|
|
c_kuzmanic Guru
Joined: 18 Apr 2002 Posts: 488 Location: Los Angeles , California
|
Posted: Thu Oct 03, 2002 10:37 am Post subject: |
|
|
Ok, problem solved
I went over to bugs.gentoo.org to make a bug report and was delighted to see that the solution was already posted there:
https://bugs.gentoo.org/show_bug.cgi?id=8679
Hope this helps any other people who might encounter this problem. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|