Does mdev support ataraid cciss ida??

Bernhard Fischer rep.dot.nop at gmail.com
Wed Jul 30 09:50:32 UTC 2008


On Mon, Jul 28, 2008 at 10:17:28AM +0200, Natanael Copa wrote:
>On Sat, 2008-07-26 at 20:35 +0200, Denys Vlasenko wrote:
>> On Saturday 26 July 2008 19:27, Michael D. Setzer II wrote:

>> mdev will not create directories by itself, but if you will explain
>> it how to map device name to the directory, it can do it.
>> 
>> This line in /etc/mdev.conf
>> 
>> <regex matching ataraid devices> 0:0 660 >ataraid/
>> 
>> will create device node as /dev/ataraid/$DEVNAME
>> and place a symlink to it in /dev/$DEVNAME.
>> 
>> <regex matching ataraid devices> 0:0 660 =ataraid/
>> 
>> will just create device node as /dev/ataraid/$DEVNAME
>> (no additional symlink).
>> 
>> You can use
>> 
>> <regex matching ataraid devices> 0:0 660 @script.sh
>> 
>> if you need some more complicated processing. script.sh
>> can find the name of the device in $MDEV.
>> 
>> I'm afraid you need to research yourself how to construct
>> <regex matching ataraid devices>.
>
>I had a user reporting a missing /dev/ida directory. IIRC the device
>files ended up like /dev/ida!<something> and I was thining of a regex in
>soemthing like:
>
>(.*)!(.*) 0:0 660 =%1/%2
>
>Since I dont have the hardware to test this myself, I would really

Me neither.
Perhaps try something like (obviously untested):

cciss!.* root:disk 0660 @/lib/mdev/exclamat_subdir
ida!.* root:disk 0660 @/lib/mdev/exclamat_subdir
rd!.* root:disk 0660 @/lib/mdev/exclamat_subdir

$ cat /lib/mdev/exclamat_subdir
#!/bin/sh

# Move device to a subdirectory.
# If no subdirectory is given as argument to this script then
# use the device up to the exclamation char ('!') as directory.

if test "x$1" = "x"
then
  dir=$(echo "$MDEV" | sed -e 's,!.*,,g' -e 's,.*/,,g')
else
  dir="$1"
fi
test -d /dev/$dir || mkdir /dev/$dir

dev=$(echo "$MDEV" | sed -e 's,!,/,g')
mv $dev /dev/$dir/

>appreciate if someone could post the relevant regexes here.

We should start to collect some of these (after testing) in
examples/mdev/{lib/,mdev.disk.conf}, i suppose.



More information about the busybox mailing list