On Wed, 2009-05-20 at 11:57 +0530, er krishna wrote:

> >>>> What about a new dameon, if we create vbladectl which will keep
> track of all the exported device based on  interface & path
> ( /dev/loop0 or eth0 ) release the attached resource or add new
> resource ? I think we can have a look for this implemenatation. 
> 
> Ed, does it seems valuable or funny. A patch will be welcome if I try
> for this implementation. Just suggest.

What I was going to do was add some more options to vblade, i.e. -d /
--daemon. vbladed would then become a symbolic link to vblade, and if
vblade is run as vbladed, --daemon is automatically assumed, everything
just goes to syslog.

The other change I will finish and submit is a simple ini style
configuration file, something like this:

[daemon]
loglevel = info
; %S is always expanded to shelf, %s always expands to slot
lockfile = /var/run/vblade/blade-%S-%s.pid

[/dev/volgroup/foo]
shelf = xx
slot = xx
eth = xx
directio = true / false
on_boot = true

[/home/foo/file.img]
...
...
...

I don't think a wire protocol (as vbladectl would suggest) is really
needed, all each vbladed process has to do is lock
via /var/run/vblade/{shelf}.{slot} , which would contain its process ID.

Similarly, vbladectl can just parse the configuration file.. i.e

vbladectl stop /dev/volgroup/foo
vbladectl restart /dev/volgroup/foo

vbladectl show would have the task of validating whatever is
in /var/run/vblade, and could easily correlate each export to the pid of
the blade handling it.

I wasn't going to get any more complicated than that, as that alone is
enough for anyone to write custom rc scripts / tools.

Really, in fact, all of that can be accomplished without touching vblade
itself. It just seemed a little cleaner to just modify it vs making a
bunch of wrappers to work around it.

This approach would also keep from breaking existing use of vblade /
vbladed.

Cheers,
--Tim




------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Aoetools-discuss mailing list
Aoetools-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aoetools-discuss

Reply via email to