Thread: Re: [Aoetools-discuss] install_nodev
Brought to you by:
ecashin,
elcapitansam
From: Don H. <Don...@pm...> - 2007-03-22 20:17:53
|
Why not let udev create them for you too? # aoe char devices SUBSYSTEM="aoe", KERNEL="discover", NAME="aoe/%k", GROUP="disk", MODE="0220" SUBSYSTEM="aoe", KERNEL="err", NAME="aoe/%k", GROUP="disk", MODE="0440" SUBSYSTEM="aoe", KERNEL="interfaces", NAME="aoe/%k", GROUP="disk", MODE="0220" ... Cheers, don > -----Original Message----- > From: aoe...@li... > [mailto:aoe...@li...] On > Behalf Of Bernard Li > Sent: Thursday, March 22, 2007 12:09 PM > To: aoe...@li... > Subject: [Aoetools-discuss] install_nodev > > Hi guys: > > One can use 'make install_nodev' and that won't create the > special device files in /dev/etherd, however, if you simply > do a 'make install', it will create _a lot_ of special devices. > > Since files like err, flush, interfaces, revalidate are > important to the operation of aoe (they are, right?) > shouldn't they still be installed even when `install_nodev` > is specified? > > I guess I'm looking for a way to install the above mentioned > special devices in /dev/etherd, but without pre-populating > the blade entires (eX.Y), since udev will take care of it. > > I hope this makes sense. > > Thanks in advance, > > Bernard > > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT Join > SourceForge.net's Techsay panel and you'll get the chance to > share your opinions on IT & business topics through brief > surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge > &CID=DEVDEV > _______________________________________________ > Aoetools-discuss mailing list > Aoe...@li... > https://lists.sourceforge.net/lists/listinfo/aoetools-discuss > |
From: Bernard L. <be...@va...> - 2007-03-23 00:06:16
|
Hi Don: Thanks for the suggestion. I am actually trying to make this work with RPM and I noticed that the install-udev script would actually install it on the filesystem of the server running rpmbuild. That aside, I still couldn't get udev to create the special files for me, even though I have /etc/udev/rules.d/60-aoe.rules. It mentioned that the aoe module needs to be started first before this will work, this is what my init script reads: # chkconfig: 2345 28 89 I'm not sure if it's started before udev... Is it possible for me to trigger the generation of the special device files with the udev aoe configuration after the system is loaded? I also have aoe-mkdevs, but that again would generate a lot of etherd devices, which I don't want -- i just want the special ones like discover, err, etc. TIA, Bernard On 3/22/07, Don Hiatt <Don...@pm...> wrote: > Why not let udev create them for you too? > > # aoe char devices > SUBSYSTEM="aoe", KERNEL="discover", NAME="aoe/%k", GROUP="disk", MODE="0220" > SUBSYSTEM="aoe", KERNEL="err", NAME="aoe/%k", GROUP="disk", MODE="0440" > SUBSYSTEM="aoe", KERNEL="interfaces", NAME="aoe/%k", GROUP="disk", MODE="0220" > ... > > Cheers, > > don > > > > > -----Original Message----- > > From: aoe...@li... > > [mailto:aoe...@li...] On > > Behalf Of Bernard Li > > Sent: Thursday, March 22, 2007 12:09 PM > > To: aoe...@li... > > Subject: [Aoetools-discuss] install_nodev > > > > Hi guys: > > > > One can use 'make install_nodev' and that won't create the > > special device files in /dev/etherd, however, if you simply > > do a 'make install', it will create _a lot_ of special devices. > > > > Since files like err, flush, interfaces, revalidate are > > important to the operation of aoe (they are, right?) > > shouldn't they still be installed even when `install_nodev` > > is specified? > > > > I guess I'm looking for a way to install the above mentioned > > special devices in /dev/etherd, but without pre-populating > > the blade entires (eX.Y), since udev will take care of it. > > > > I hope this makes sense. > > > > Thanks in advance, > > > > Bernard > > > > -------------------------------------------------------------- > > ----------- > > Take Surveys. Earn Cash. Influence the Future of IT Join > > SourceForge.net's Techsay panel and you'll get the chance to > > share your opinions on IT & business topics through brief > > surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge > > &CID=DEVDEV > > _______________________________________________ > > Aoetools-discuss mailing list > > Aoe...@li... > > https://lists.sourceforge.net/lists/listinfo/aoetools-discuss > > > |
From: Ed L. C. <ec...@co...> - 2007-03-23 17:05:44
|
On Thu, Mar 22, 2007 at 05:06:15PM -0700, Bernard Li wrote: ... > I also have aoe-mkdevs, but that again would generate a lot of etherd > devices, which I don't want -- i just want the special ones like > discover, err, etc. If you are really having trouble with udev you can always do what it does, which is to get the right major and minor numbers out of sysfs and run mknod. for f in /sys/class/aoe/*/dev; do n=`dirname $f` n=`basename $n` awk -v name=$n -F: '{ print "mknod /dev/etherd/" name " c " $1 " " $2 }' $f done Just add " | sh" after "done" to actually run those commands instead of printing them out. -- Ed L Cashin <ec...@co...> |
From: Bernard L. <be...@va...> - 2007-03-23 18:32:08
|
Hi guys: Okay, my suspicion was correct. discover, err, etc. were created under /dev but not /dev/etherd. This is fine, but scripts like aoe-discover expects to find those files in /dev/etherd. I am not sure how the mismatch came about -- I don't think it's using the udev rules provided by the AoE package but perhaps via the kernel itself (this is CentOS 4.4 stock kernel). I suppose I could modify the Makefile and change DEVSUBDIR, but that would put all the blades in /dev instead of /dev/etherd (I suppose that's fine too...) Any suggestions? Thanks, Bernard On 3/23/07, Ed L. Cashin <ec...@co...> wrote: > On Thu, Mar 22, 2007 at 05:06:15PM -0700, Bernard Li wrote: > ... > > I also have aoe-mkdevs, but that again would generate a lot of etherd > > devices, which I don't want -- i just want the special ones like > > discover, err, etc. > > If you are really having trouble with udev you can always do what it > does, which is to get the right major and minor numbers out of sysfs > and run mknod. > > for f in /sys/class/aoe/*/dev; do > n=`dirname $f` > n=`basename $n` > awk -v name=$n -F: '{ > print "mknod /dev/etherd/" name " c " $1 " " $2 > }' $f > done > > Just add " | sh" after "done" to actually run those commands instead > of printing them out. > > > -- > Ed L Cashin <ec...@co...> > |
From: Ed L. C. <ec...@co...> - 2007-03-23 18:55:40
|
On Fri, Mar 23, 2007 at 11:32:07AM -0700, Bernard Li wrote: > Hi guys: > > Okay, my suspicion was correct. discover, err, etc. were created > under /dev but not /dev/etherd. > > This is fine, but scripts like aoe-discover expects to find those > files in /dev/etherd. You haven't posted your udev rules, but Don Hiatt did. His udev rules put the device nodes in a /dev/aoe directory. You can put them wherever you want. > I am not sure how the mismatch came about -- I don't think it's using > the udev rules provided by the AoE package but perhaps via the kernel > itself (this is CentOS 4.4 stock kernel). The CentOS 4.4 udev package doesn't have these rules. (The kernel itself doesn't say much besides what major and minor device numbers to use.) > I suppose I could modify the Makefile and change DEVSUBDIR, but that > would put all the blades in /dev instead of /dev/etherd (I suppose > that's fine too...) > > Any suggestions? The CentOS udev RPM comes with documentation that should it easy for you to create devices where you like. -- Ed L Cashin <ec...@co...> |
From: Bernard L. <be...@va...> - 2007-03-23 19:05:58
|
Hi Ed: On 3/23/07, Ed L. Cashin <ec...@co...> wrote: > You haven't posted your udev rules, but Don Hiatt did. His udev rules > put the device nodes in a /dev/aoe directory. You can put them > wherever you want. Actually on that server, I do _not_ have any udev rules, but /dev/etherd/eX.Y and /dev/discover etc. still got created when I run `modprobe aoe`. So either it is picking up the rules some place else, I am not sure. I grepped for "aoe" in the /etc/udev dir and didn't find anything. Cheers, Bernard |
From: Ed L. C. <ec...@co...> - 2007-03-23 20:41:37
|
On Fri, Mar 23, 2007 at 12:05:52PM -0700, Bernard Li wrote: ... > Actually on that server, I do _not_ have any udev rules, Well, I know you're making an RPM, so just arrange for the host where you want the character devices to be created to have udev rules for those character devices, using the syntax for your O.S. Here is a bit of history to supplement the udev documentation: 1) The SUBSYSTEM setting wasn't always there. If your section 8 udev manpage doesn't mention it, try leaving it out of your rules. 2) The double equal signs for SUBSYSTEM and KERNEL used to be single. Older versions of udev might not like the double equals signs. You can see which is correct by looking in the udev manpage section on udev configuration. With those points in mind, you should be able to modify the example in the aoe driver sources linux/Documentation/aoe directory or in the EtherDrive HOWTO FAQ to suit your udev installation. http://www.coraid.com/support/linux/EtherDrive-2.6-HOWTO-5.html#ss5.12 -- Ed L Cashin <ec...@co...> |