Does mdev support ataraid cciss ida??

Bernhard Fischer rep.dot.nop at gmail.com
Thu Jul 31 12:34:48 UTC 2008


On Thu, Jul 31, 2008 at 01:26:43PM +0200, Natanael Copa wrote:
>On Wed, 2008-07-30 at 11:50 +0200, Bernhard Fischer wrote:
>> 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
>
>you can do that with the regex and create dir feature in mdev so you
>dont need no exclamat_subdir
>
>...
>
>> >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.
>
>i post what i use atm. (when i look at it, seems like the dvbdev could
>be replaced with a regex in mdev.conf)
>
>-nc
>

># 
># This is a sample mdev.conf.
>#
>
># Devices:
># Syntax: %s %d:%d %s
># devices user:group mode
>
># null does already exist; therefore ownerchip has to be changed with command

s/ownerchip/ownership/; # :)

>null	root:root 0666	@chmod 666 $MDEV
>zero	root:root 0666
>grsec	root:root 0660
>full	root:root 0666
>
>random	root:root 0666
>urandom	root:root 0444
>hwrandom root:root 0660
>
># console does already exist; therefore ownerchip has to be changed with command

ditto.

>console	root:tty 0600	@chmod 600 $MDEV && mkdir -p vc && ln -sf ../$MDEV vc/0
>fd0	root:floppy 0660
>kmem	root:root 0640
>mem	root:root 0640
>port	root:root 0640
>ptmx	root:tty 0666
>
># ram.*
>ram([0-9]*)	root:disk 0660 >rd/%1
>loop([0-9]+)	root:disk 0660 >loop/
>sd[a-z][0-9]*	root:disk 0660 */lib/mdev/sd_links
>hd[a-z][0-9]*	root:disk 0660 */lib/mdev/ide_links
>md[0-9]		root:disk 0660
>
>tty		root:tty 0666
>tty[0-9]	root:root 0600
>tty[0-9][0-9]	root:tty 0660
>ttyS[0-9]*	root:uucp 0660
>pty.*		root:tty 0660
>vcs[0-9]*	root:tty 0660
>vcsa[0-9]*	root:tty 0660
>
>
>ttyLTM[0-9]	root:dialout 0660 @ln -sf $MDEV modem
>ttySHSF[0-9]	root:dialout 0660 @ln -sf $MDEV modem
>slamr		root:dialout 0660 @ln -sf $MDEV slamr0
>slusb		root:dialout 0660 @ln -sf $MDEV slusb0
>fuse		root:root  0666
>
># dri device
>card[0-9]	root:video 0660 =dri/
>
># alsa sound devices and audio stuff
>pcm.*		root:audio 0660	=snd/
>control.*	root:audio 0660	=snd/
>midi.*		root:audio 0660	=snd/
>seq		root:audio 0660	=snd/
>timer		root:audio 0660	=snd/
>
>adsp		root:audio 0660 >sound/
>audio		root:audio 0660 >sound/
>dsp		root:audio 0660 >sound/
>mixer		root:audio 0660 >sound/
>sequencer.*	root:audio 0660 >sound/
>
># misc stuff
>agpgart		root:root 0660  >misc/
>psaux		root:root 0660  >misc/
>rtc		root:root 0664  >misc/
>
># input stuff
>mice		root:root 0640 =input/
>mouse[0-9]	root:root 0640 =input/
>ts[0-9]		root:root 0600 =input/
>
># v4l stuff
>vbi[0-9]	root:video 0660 >v4l/
>video[0-9]	root:video 0660 >v4l/
>
># dvb stuff
>dvb.*		root:video 0660 */lib/mdev/dvbdev
>
># load drivers for usb devices
>usbdev[0-9].[0-9]	root:root 0660 */lib/mdev/usbdev
>usbdev[0-9].[0-9]_.*	root:root 0660
>
># net devices
>tun[0-9]*	root:root 0600 =net/
>tap[0-9]*	root:root 0600 =net/
>
># zaptel devices
>zap(.*)		root:dialout 0660 =zap/%1
>
# so this should work:
cciss!(.*) root:disk 0660 =cciss/%1
ida!(.*) root:disk 0660 =ida/%1
rd!(.*) root:disk 0660 =rd/%1
# or even something like
# ([^\!][^\!]*)!(.*) root:disk 0660 =%1/%2




More information about the busybox mailing list